{"id":"CVE-2026-71494","aliases":["CVE-2026-71494","GHSA-6x6c-w9w9-hv4h","GO-2026-6437"],"related":[],"kind":"vulnerability","state":"published","title":"Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nSensitive 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. \n\nThe 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.\n\n### Patches\n\nFixed in `v0.10.45` ([#3590](https://github.com/infracost/infracost/pull/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\n  - Installed via the official script, a package manager, or the `latest` Docker tag: upgrade to `v0.10.45` (or later) to receive the fix.\n  - Pinned to a specific version or image digest: bump to `v0.10.45`.\n\n### Workarounds\n\nNo 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname in github.com/infracost/infracost","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-08-21T17:50:43.655Z","modified":"2026-10-14T19:10:00.297Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-522"],"affected":[{"ranges":[{"version":"< 0.10.45","status":"affected"}],"vendor":"infracost","product":"infracost","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.10.45"}],"ecosystem":"Go","package":"github.com/infracost/infracost","purl":"pkg:golang/github.com/infracost/infracost","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.10.45"}],"ecosystem":"Go","package":"github.com/infracost/infracost","purl":"pkg:golang/github.com/infracost/infracost","source":"go"}],"references":[{"url":"https://github.com/infracost/infracost/security/advisories/GHSA-6x6c-w9w9-hv4h","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/infracost/infracost/pull/3590","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/infracost/infracost/commit/3d24c757f5e4e60c7259f1b89ad7ceaabcfca86f","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/infracost/infracost/releases/tag/v0.10.45","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71494","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/infracost/infracost","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-21T19:23:15.884Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-71494","url":"https://www.cve.org/CVERecord?id=CVE-2026-71494","licence":"CVE Terms of Use","modified":"2026-08-21T19:23:57.520Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6x6c-w9w9-hv4h","url":"https://github.com/advisories/GHSA-6x6c-w9w9-hv4h","licence":"CC-BY-4.0","modified":"2026-09-10T15:25:49.591Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6437","url":"https://pkg.go.dev/vuln/GO-2026-6437","licence":"CC-BY-4.0","modified":"2026-09-10T15:15:15.615Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-71494","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71494","licence":"Public domain","modified":"2026-10-14T19:10:00.297Z"}],"updatedAt":"2026-11-25T22:59:34.808Z","epss":{"score":0.00367,"percentile":0.32524,"date":"2026-12-01T12:00:22.000Z"}}