GHSA-6x6c-w9w9-hv4h

Suggest an improvement
Source
https://github.com/advisories/GHSA-6x6c-w9w9-hv4h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-6x6c-w9w9-hv4h/GHSA-6x6c-w9w9-hv4h.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-6x6c-w9w9-hv4h
Aliases
Published
2026-09-08T18:14:12Z
Modified
2026-09-10T15:25:38Z
Severity
  • 5.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname
Details

Impact

Sensitive information exposure in the Infracost Terraform Cloud/Enterprise integration. Several code paths attached a configured secret token to a request whose host was taken straight from the scanned Terraform, with no check that the host was the trusted endpoint.

The condition that matters is whether a Terraform Cloud/Enterprise (or registry) token is present in the run: if one is, the injected hostname can disclose it. Impact therefore depends on the trigger. Under on: pull_request (the only configuration in Infracost's documentation) fork pull requests run without secrets, so no token is present. It only reaches token disclosure under pull_request_target, a same-repository pull request, or another CI setup that provides the token alongside untrusted Terraform, and exploiting an untrusted fork pull request also typically needs a maintainer to approve the workflow run. The patch scopes the token to the trusted host regardless of trigger.

Patches

Fixed in v0.10.45 (#3590) by attaching a token only when the destination host matches the configured trusted host; otherwise Infracost refuses to send it and skips remote variable loading

  • Installed via the official script, a package manager, or the latest Docker tag: upgrade to v0.10.45 (or later) to receive the fix.
  • Pinned to a specific version or image digest: bump to v0.10.45.

Workarounds

No full fix without upgrading. To limit exposure: use on: pull_request rather than pull_request_target, pin organization, workspace, and host in Infracost config so the .tf hostname is ignored, and keep Terraform Cloud and registry tokens out of runs that process untrusted pull request content.

Database specific
{
    "cwe_ids": [
        "CWE-522"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-09-08T18:14:12Z",
    "nvd_published_at": "2026-08-21T18:16:50Z",
    "severity": "MODERATE"
}
References

Affected packages

Go / github.com/infracost/infracost

Package

Name
github.com/infracost/infracost
View open source insights on deps.dev
Purl
pkg:golang/github.com/infracost/infracost

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.10.45

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-6x6c-w9w9-hv4h/GHSA-6x6c-w9w9-hv4h.json"