Read the docs

Script injection via pull request title in Infracost GitHub Action

Priority LOW 36CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Active
Attack complexity
Low
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

Summary

Infracost's infracost/actions/diff GitHub Action from version 4.0.0 before 4.2.0 is affected. The Derive context step inserts the pull request title directly into a bash run block, so a title containing shell syntax such as $(...) or backticks runs as code on the Actions runner (CWE-94). Anyone who can open a pull request can set the title, and the injected commands run with the privileges of the workflow. Under pull_request, fork pull requests run without secrets and with a read-only token, but with pull_request_target or same-repository pull requests the injected code can reach repository secrets and a writable GITHUB_TOKEN.

Written with Claude Haiku 5.5 from the sources below · 2026-12-04

Description from the CNA

Infracost helps see cloud cost estimates for Terraform in pull requests. From version 4.0.0 to before version 4.2.0, there is a GitHub Actions script injection vulnerability in the infracost/actions/diff action. The "Derive context" step interpolated the pull request title straight into a bash run: block. Actions expands ${{ ... }} into the script before bash runs, so a PR title containing $(...), backticks, or ; executes as code on the runner. Anyone who can open a pull request can set the title. Successful exploitation runs arbitrary commands on the Actions runner with the privileges of the workflow. Impact depends on what the workflow exposes: under on: pull_request (the only configuration in Infracost's documentation) fork pull requests run without secrets and with a read-only token, so exposure is limited. If the action is used with pull_request_target, or triggered by a same-repository pull request, the injected code gains the repository's secrets and a writable GITHUB_TOKEN, enabling secret theft and repository modification. Exploiting an untrusted fork pull request also typically requires a maintainer to approve the workflow run. This issue has been patched in version 4.2.0.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00756 56th percentileScored 2026-12-04
Fix Fixed actions (infracost): 4.2.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
infracostactions4.0.0 to before 4.2.04.2.0Patch availableCNA
  • actions Vendorinfracost Affected 4.0.0 to before 4.2.0 Fixed in 4.2.0 Patch available CNA

Remediation

Update infracost/actions/diff to version 4.2.0 or later, which fixes the issue. The sources list no fixed version for other Infracost products.

Written with Claude Haiku 5.5 from the sources below · 2026-12-04

  • Fix · CNA actions (infracost) Fixed in 4.2.0

Timeline

  1. 2026-12-03 Threatist record created from CVE-2026-61706
  2. 2026-12-04 CISA SSVC decision points changed

References

  • TI-2026-50101 Infracost: Arbitrary file read via config-template readFile symlink traversal CVSS 4.0MEDIUM 5.9
  • TI-2026-50102 Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname CVSS 4.0MEDIUM 5.9
  • TI-2026-103951 Path traversal in Infracost app mode leaks files from the runner CVSS 4.0MEDIUM 5.3

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences