CVE-2026-61706
Infracost helps see cloud cost estimates for Terraform in pull …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/infracost/actions/commit/fb736a8f219195d6efdca58682069b16fe1bc280
- github.com/infracost/actions/pull/262
- github.com/infracost/actions/releases/tag/v4.2.0
- github.com/infracost/actions/security/advisories/GHSA-whm3-8375-8m8j
- nvd.nist.gov/vuln/detail/CVE-2026-61706
- cve.org/CVERecord?id=CVE-2026-61706
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.