# CVE-2026-61706: Infracost GitHub Action: Script injection via pull request title in infracost/actions/diff

- **Severity:** HIGH 7.4
- **CVSS:** 7.4 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Active; Confidentiality impact: High; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **CWE:** CWE-94
- **Published:** 2026-12-03T22:54:45.799Z
- **Modified:** 2026-12-04T00:19:18.413Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker who can open a pull request can inject shell commands through the PR title into the Infracost GitHub Action diff workflow, executing code on the Actions runner.

## Who should check

- Anyone running infracost actions \>= 4.0.0, \< 4.2.0

## Description

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.

## Affected and fixed versions

- infracost actions: \>= 4.0.0, \< 4.2.0 (cvelist)

## Technologies

GitHub Actions (AI-matched)

## Mitigation

- Upgrade actions to 4.2.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-61706. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-61706.md
Affected: infracost actions >= 4.0.0, < 4.2.0
Fixed in: infracost actions 4.2.0

Steps:
1. Search this machine and project for infracost actions: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-61706 being exploited?

There is no confirmed exploitation: CVE-2026-61706 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-61706?

High: CVSS 7.4 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-61706?

infracost actions \>= 4.0.0, \< 4.2.0.

### Is there a fix for CVE-2026-61706?

Yes. Fixed in infracost actions 4.2.0. Upgrade actions to 4.2.0 or later.

### How do I check if I'm affected by CVE-2026-61706?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/infracost/actions/security/advisories/GHSA-whm3-8375-8m8j>
- patch: <https://github.com/infracost/actions/pull/262>
- patch: <https://github.com/infracost/actions/commit/fb736a8f219195d6efdca58682069b16fe1bc280>
- other: <https://github.com/infracost/actions/releases/tag/v4.2.0>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-61706>

HTML: <https://flawdb.com/CVE-2026-61706> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-61706>
