Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain repository write or PR-submission access
-
DeliveryCommit directory symlink pointing outside the checkout root
-
ExploitTrigger CI/CD pipeline executing Infracost
-
InstallTemplate function resolves evil/file via intermediate symlink
-
C2os.ReadFile reads runner-accessible sensitive file
-
ExecuteCaptured content rendered into Infracost configuration output
-
ImpactSecrets surfaced in PR comment or Infracost dashboard
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to have repository write access or pull-request submission rights to a repository where Infracost processes template configurations in CI/CD. The attacker must commit at least one symbolic link within the repository whose resolved target path exits the repository root - specifically, an intermediate directory symlink (e.g., a directory entry that is itself a symlink) is the critical condition the original code failed to block, as documented in the description and confirmed by the PR test fixtures. The CI runner must then execute Infracost against the malicious repository content, and sensitive files must be accessible from the runner's filesystem for those contents to be captured. Exploitation is limited by UI:A (an automated or human-triggered CI run must occur) and AT:P (repository write access is a prerequisite). Organizations running Infracost exclusively on internal repositories with controlled contributor lists have materially reduced exposure compared to open-source projects accepting external PRs. |
| Impact | The CVSS 4.0 score of 5.9 (Medium) reflects two key limiting factors: AT:P (specific attack prerequisites - attacker must have repository write access to commit a symlink) and UI:A (user interaction - the CI/CD pipeline must execute Infracost against the repository). The VC:H metric confirms that successful exploitation yields high confidentiality impact, particularly in CI runner environments that expose cloud credentials, API tokens, or organization secrets as environment variables or filesystem files. No CISA KEV listing is present and no public exploit has been identified at time of analysis, indicating this has not been observed as actively exploited at scale. Real-world risk is highest for open-source projects that run Infracost against untrusted pull requests where the CI runner has broad secret access. EPSS data was not provided in the input and cannot be independently quantified from available data. The CVSS 4.0 AT:P and UI:A mitigations align with the description - this is a real but targeted-exposure vulnerability rather than a broadly automated threat. |
| Exploit ScenarioDerived | An attacker with contributor access to an open-source repository submits a pull request containing a directory symlink (e.g., evil -> /home/runner/work/_temp) and references evil/credentials in an Infracost template configuration. When the project's CI/CD pipeline runs Infracost on the PR, the template engine follows the intermediate symlink, reads sensitive files from the runner's environment, and surfaces their contents in the Infracost bot's PR comment or dashboard. The security test added in PR #3586 explicitly reproduces this scenario (labeled 'FIX-313 PoC'), confirming the attack path is straightforward to construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 21, 2026
Infracost's template engine prior to v0.10.45 allows repository-controlled symlinks to escape the checkout directory, enabling any contributor with repository write access to read files accessible to the CI/CD runner. The vulnerable template functions - readFile, pathExists, isDir, and matchPaths in internal/config/template/parser.go - relied on lexical filepath.Abs normalization and leaf-only os.Lstat checks that failed to resolve intermediate directory symlinks, so a path like evil/secret passes validation while physically exiting the repository root. Captured file contents are rendered into Infracost configuration output and surfaced via the Infracost dashboard or pull request comments; no public exploit identified at time of analysis, and vendor-released patch is confirmed in v0.10.45.
RemediationAI
Upgrade to Infracost v0.10.45, the vendor-released patch confirmed by the tagged release at https://github.com/infracost/infracost/releases/tag/v0.10.45 and verifiable via commit 4d39331afc0e27752d16d9d91c34583e5e8487fb in PR #3586. As a compensating control for environments that cannot immediately upgrade, restrict Infracost CI/CD execution to trusted branches or internal-only repositories, preventing untrusted contributors from submitting symlink-containing content for processing - the trade-off is that automated cost estimates on external pull requests will be unavailable. Additionally, audit runner environments to minimize sensitive file and secret exposure on the CI filesystem; using short-lived, scoped credentials rather than long-lived tokens reduces the blast radius of any file read, since the attacker can only exfiltrate what the runner can access. See the vendor advisory at https://github.com/infracost/infracost/security/advisories/GHSA-mmg6-4qmv-6pc8 for further guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Infracost (cpe:2.3:a:infracost:infracost:*:*:*:*:*:*:*:*) is a Go-based cloud cost estimation tool that processes infrastructure-as-code repositories within CI/CD pipelines. The root cause is CWE-22 (Path Traversal), specifically an incomplete symlink resolution strategy in parser.go. Four template functions used filepath.Abs - a purely lexical operation that normalizes dot-dot sequences but does not follow symlinks - combined with os.Lstat, which returns metadata about the symlink entry itself rather than its resolved target. This meant that a directory symlink evil pointing to /outside/repo would satisfy the lexical prefix check (evil remains under the repo root lexically), while os.Lstat on the final component would only check the leaf file, missing the intermediate escape. The fix introduced in PR #3586 (commit 4d39331) replaces the broken isSubdirectory() helper with security.IsPathAllowed(), which fully evaluates all symlink components via proper resolution before comparing against the repository root, closing both intermediate-directory and leaf-symlink escape vectors.
Know when Infracost gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Attacker needs no CI/CD privileges (PR:N); scope changes as the runner filesystem is accessed beyond the repository boundary (S:C); CI pipeline execution constitutes required user interaction (UI:R).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Infracost provides cloud cost intelligence for engineers, AI coding agents, and CI/CD. Prior to 0.10.45, the readFile, pathExists, isDir, and matchPaths template functions in internal/config/template/parser.go use a lexical filepath.Rel check and a leaf-only os.Lstat check that do not resolve an intermediate directory symlink. A repository can contain a path such as evil/file where evil points outside the checkout, causing os.ReadFile and related operations to follow the symlink and read runner-accessible files. The resulting content is rendered into generated configuration and can be surfaced through the Infracost dashboard or pull request comment, with greater impact in workflows that provide repository secrets. This issue is fixed in version 0.10.45.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-64035
GHSA-mmg6-4qmv-6pc8
NVD
CVE.org
EPSS
Exploit-DB