Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/infracost/infracost
  4. ›
  5. CVE-2026-71493

CVE-2026-71493: Infracost: Arbitrary file read via config-template readFile symlink traversal

September 8, 2026

Path traversal via link following in the Infracost config-template parser. The readFile, pathExists, isDir, and matchPaths template functions confined repo-supplied paths with a lexical filepath.Rel check plus a leaf-only os.Lstat:

{{ readFile "evil/file" }}

With an intermediate directory symlink committed in the repo (evil -> /), the path is lexically clean and the leaf is a regular file, so both checks pass, but os.ReadFile follows the symlink and reads outside the checkout. The contents are rendered into the generated config and surfaced via the Infracost dashboard and PR comment, so anyone who can open a pull request can read files off the runner.

Affects infracost up to and including v0.10.44. Successful exploitation reads any file the CLI process can reach on the runner. Impact depends on what the run exposes: under on: pull_request (the configuration in Infracost’s documentation) fork pull requests run without secrets and with a read-only token, so exposure is limited. If Infracost runs under pull_request_target, or is triggered by a same-repository pull request, the read reaches the repository’s secrets, enabling secret theft. The patch confines all four functions regardless of trigger.

References

  • github.com/advisories/GHSA-mmg6-4qmv-6pc8
  • github.com/infracost/infracost/commit/4d39331afc0e27752d16d9d91c34583e5e8487fb
  • github.com/infracost/infracost/pull/3586
  • github.com/infracost/infracost/releases/tag/v0.10.45
  • github.com/infracost/infracost/security/advisories/GHSA-mmg6-4qmv-6pc8
  • nvd.nist.gov/vuln/detail/CVE-2026-71493

Code Behaviors & Features

Detect and mitigate CVE-2026-71493 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.10.45

Fixed versions

  • 0.10.45

Solution

Upgrade to version 0.10.45 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')

Source file

go/github.com/infracost/infracost/CVE-2026-71493.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 07 Oct 2026 12:19:19 +0000.