Skip to main content

Infracost CVE-2026-71493

| EUVDEUVD-2026-64035 MEDIUM
Path Traversal (CWE-22)
2026-08-21 GitHub_M GHSA-mmg6-4qmv-6pc8
5.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain repository write or PR-submission access
  2. Delivery
    Commit directory symlink pointing outside the checkout root
  3. Exploit
    Trigger CI/CD pipeline executing Infracost
  4. Install
    Template function resolves evil/file via intermediate symlink
  5. C2
    os.ReadFile reads runner-accessible sensitive file
  6. Execute
    Captured content rendered into Infracost configuration output
  7. Impact
    Secrets 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

infracost < 0.10.45

Affected Packages

go github.com/infracost/infracost fix: 0.10.45
euvd infracost fix: 0.10.45

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

Vendor (GitHub_M) PRIMARY 5.9 MEDIUM
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
vuln.today AI 7.4 HIGH

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).

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Aug 21, 2026 - 19:02 EUVD

DescriptionCVE.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

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Medium
popular IaC cost tool widely adopted in CI/CD pipelines
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy