cve.bz

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

7.4 high

High (7.4) in infracost actions.

On this page
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.

Severity

CVSS 4.0

7.4 high
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
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Assigned by
GitHub_M (CNA)
NVD analysis
Not in the NVD yet
Record from
the CVE List, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-61706 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-61706?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-61706?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-61706 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
infracost actions>= 4.0.0, < 4.2.0

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON