Description
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.
Published: 2026-08-21
Score: 5.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary file read (information disclosure)
Action: Patch immediately
AI Analysis

Impact

The vulnerability allows a repository author to craft a symlink that points outside the checked‑out workspace. The internal template functions readFile, pathExists, isDir, and matchPaths resolve the link naïvely, causing the tool to follow the link and read arbitrary runner‑accessible files. The leaked content is injected into generated configuration and can appear in the Infracost dashboard or a pull‑request comment, potentially exposing secrets when the workflow provides them.

Affected Systems

The flaw exists in all Infracost releases prior to v0.10.45. Attackers only need to supply a malformed repository containing a malicious symlink; any user of the affected version running Infracost will be able to read files that the CI runner can access.

Risk and Exploitability

The CVSS score of 5.9 indicates moderate severity. EPSS is not available, and the vulnerability is not listed in CISA's KEV catalog, suggesting it has not yet been widely exploited. However, because Infracost is commonly run in CI/CD pipelines, a malicious repository could exercise the flaw during normal job execution. The attack vector is likely local to the CI runner, with the attacker controlling the repository contents.

Generated by OpenCVE AI on August 21, 2026 at 19:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Infracost to version 0.10.45 or later, where the issue is resolved.
  • Verify that any repository contains no symlinks that point outside the checkout before invoking Infracost.
  • If upgrade is not possible immediately, remove or disable the template functions that perform readFile, pathExists, isDir and matchPaths, or restrict them to safe directories only.

Generated by OpenCVE AI on August 21, 2026 at 19:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-mmg6-4qmv-6pc8 Infracost: Arbitrary file read via config-template readFile symlink traversal
History

Wed, 26 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 21 Aug 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Infracost
Infracost infracost
Vendors & Products Infracost
Infracost infracost

Fri, 21 Aug 2026 18:15:00 +0000

Type Values Removed Values Added
Description 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.
Title Infracost: Arbitrary file read via config-template readFile symlink traversal
Weaknesses CWE-22
CWE-59
References
Metrics cvssV4_0

{'score': 5.9, 'vector': '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'}


Subscriptions

Infracost Infracost
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-26T17:33:14.286Z

Reserved: 2026-08-06T19:56:23.725Z

Link: CVE-2026-71493

cve-icon Vulnrichment

Updated: 2026-08-26T17:33:10.360Z

cve-icon NVD

Status : Received

Published: 2026-08-21T18:16:50.440

Modified: 2026-08-26T18:17:00.540

Link: CVE-2026-71493

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T21:15:09Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')