CVE-2026-71494
JSON

5.9medium

Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname

Severity
5.9medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.37% (higher than 32% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6x6c-w9w9-hv4hGO-2026-6437

Description

Infracost provides cloud cost intelligence for engineers, AI coding agents, and CI/CD. Prior to 0.10.45, internal/hcl/remote_variables_loader.go and related Terraform Cloud, remote-plan, and Terragrunt registry request paths can attach a configured Terraform Cloud or registry token to a destination hostname derived from untrusted Terraform input without confirming that it is the configured trusted host. When a CI run provides a token while scanning attacker-controlled Terraform, including pull_request_target or a same-repository pull request, an attacker can direct the request to an attacker-controlled host and disclose the token. Standard fork pull_request workflows without secrets are not exposed. This issue is fixed in version 0.10.45.

Affected

Product or packageVersionsReported by
infracost infracost< 0.10.45CVE List
github.com/infracost/infracost (Go)before 0.10.45GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Classification

CWE-522

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Infracost provides cloud cost intelligence for engineers, AI coding agents, and CI/CD. Prior to 0.10.45, internal/hcl/remote_variables_loader.go and related Terraform Cloud, remote-plan, and Terragrunt registry request paths can attach a configured Terraform Cloud or registry token to a destination hostname derived from untrusted Terraform input without confirming that it is the configured trusted host. When a CI run provides a token while scanning attacker-controlled Terraform, including pull_request_target or a same-repository pull request, an attacker can direct the request to an attacker-controlled host and disclose the token. Standard fork pull_request workflows without secrets are not exposed. This issue is fixed in version 0.10.45.

GitHub Advisory Database
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.

Go Vulnerability Database

Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname in github.com/infracost/infracost

NVD (es)

Infracost proporciona inteligencia de costos en la nube para ingenieros, agentes de codificación de IA y CI/CD. Antes de la versión 0.10.45, internal/hcl/remote_variables_loader.go y las rutas de solicitud relacionadas de Terraform Cloud, remote-plan y el registro de Terragrunt pueden adjuntar un token configurado de Terraform Cloud o de registro a un nombre de host de destino derivado de una entrada de Terraform no confiable sin confirmar que sea el host confiable configurado. Cuando una ejecución de CI proporciona un token mientras escanea Terraform controlado por el atacante, incluyendo pull_request_target o una solicitud de extracción del mismo repositorio, un atacante puede dirigir la solicitud a un host controlado por el atacante y divulgar el token. Los flujos de trabajo estándar de solicitud de extracción de bifurcación sin secretos no están expuestos. Este problema está solucionado en la versión 0.10.45.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-71494 changed 2026-08-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-6x6c-w9w9-hv4h changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6437 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-71494 changed 2026-10-14Public domain