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.
Published: 2026-08-21
Score: 5.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Credential Exposure
Action: Apply Patch
AI Analysis

Impact

Infracost versions before 0.10.45 allow the Terraform Cloud or registry token to be attached to a destination hostname that originates from untrusted Terraform input without validating the host against the configured trusted host. This flaw permits an attacker who controls the Terraform code or who can influence a CI run to direct the token to an attacker‑controlled server and thereby exfiltrate that token. The vulnerability is a data confidentiality issue that could also enable unauthorized access to the Terraform Cloud account.

Affected Systems

The issue affects the Infracost tool, specifically all releases prior to version 0.10.45. The vulnerability is present in the internal/hcl/remote_variables_loader.go component and related request paths used for Terraform Cloud, remote‑plan, and Terragrunt registry interactions.

Risk and Exploitability

The CVSS score is 5.9, indicating a moderate impact. An attacker needs the ability to supply Terraform input that triggers a CI run, such as through pull_request_target or same‑repository pull requests. If the CI environment supplies a Terraform Cloud or registry token during the scan, the unvalidated hostname can leak the token to an attacker‑controlled host. The EPSS score is unavailable, and the vulnerability is not listed in the CISA KEV catalog. Nonetheless, because the attack vector relies on CI workflows that many projects use, the risk of exploitation is considered moderate.

Generated by OpenCVE AI on August 21, 2026 at 19:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Infracost to version 0.10.45 or later to eliminate the unvalidated hostname flaw
  • Ensure CI pipelines do not pass Terraform Cloud or registry tokens to untrusted Terraform input when using pull_request_target or same‑repository pull requests
  • Limit Infracost’s remote variable loader to trusted hosts by validating destination hostnames before attaching tokens

Generated by OpenCVE AI on August 21, 2026 at 19:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6x6c-w9w9-hv4h Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname
History

Fri, 21 Aug 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Infracost
Infracost infracost
Vendors & Products Infracost
Infracost infracost

Fri, 21 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 21 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
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.
Title Infracost: Terraform Cloud and registry token disclosure via unvalidated hostname
Weaknesses CWE-522
References
Metrics cvssV4_0

{'score': 5.9, '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'}


Subscriptions

Infracost Infracost
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-21T19:23:57.520Z

Reserved: 2026-08-06T19:56:23.725Z

Link: CVE-2026-71494

cve-icon Vulnrichment

Updated: 2026-08-21T19:23:40.787Z

cve-icon NVD

Status : Received

Published: 2026-08-21T18:16:50.590

Modified: 2026-08-21T20:16:40.340

Link: CVE-2026-71494

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T21:15:11Z

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials