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

Published Dec 3, 2026
·
Updated

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: pullrequest (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 pullrequesttarget, or triggered by a same-repository pull request, the injected code gains the repository's secrets and a writable GITHUBTOKEN, 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 Software

1 affected component
Infracost Infracost GitHub Action (infracost/actions/diff)>=4.0.0<4.2.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade infracost/actions/diff to a version that resolves this vulnerability.

    Fixed in 4.2.0

Event History

Dec 3, 2026
CVE Published
via MITRE·10:54 PM
Data Sourced
via MITRE·10:54 PM
DescriptionWeakness

Frequently Asked Questions

1

Which workflows are most exposed to secret theft or repository modification?

Workflows that use the action with pull_request_target, or that run for same-repository pull requests, are most exposed. In those cases, injected commands can access repository secrets and a writable GITHUB_TOKEN.

2

Is the documented default pull request configuration affected?

Yes, the injection can still execute on the runner under on: pull_request. However, fork pull requests in that configuration run without secrets and with a read-only token, which limits the impact.

3

What must an attacker do to exploit this issue?

An attacker needs the ability to open a pull request and set its title to shell syntax such as $(...), backticks, or a semicolon-delimited command. For an untrusted fork pull request, a maintainer typically must approve the workflow run before exploitation occurs.

4

What version should be deployed to remediate the issue?

Update infracost/actions/diff to version 4.2.0 or later. Versions from 4.0.0 through before 4.2.0 are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203