# CVE-2026-16496: HashiCorp terraform-mcp-server auth bypass in stateful transport mode

Source: https://junglewise.ai/threats/cve-2026-16496-hashicorp-terraform-mcp-server-auth-bypass-in-stateful-transport  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-28. Updated: 2026-07-28  
License: CC BY 4.0 with a link back

CVE-2026-16496 · Severity: high · CVSS 8.9 · Published 2026-07-28

HashiCorp terraform-mcp-server is a service that allows AI agents and other tools to interact with Terraform environments. A security flaw in its session management allows an attacker who obtains a valid session ID to hijack another user's connection. This could allow the attacker to perform actions in Terraform using the victim's credentials, potentially leading to unauthorized access or modification of infrastructure, workspaces, and sensitive variables.

Technologies: [HashiCorp Terraform-Mcp-Server](https://junglewise.ai/threats/technologies/terraform-mcp-server). Vendors: [HashiCorp](https://junglewise.ai/threats/vendors/hashicorp).

## Quick answers

**Is CVE-2026-16496 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-16496 being exploited in the wild.

**How severe is CVE-2026-16496?** High severity, with a CVSS score of 8.9, published 28 July 2026.

**Which products and versions are affected?** HashiCorp terraform-mcp-server 0.2.1 up to and including 1.0.0.

**Is there a fix for CVE-2026-16496?** A patch was published on 2026-07-28: Fixed in version 1.1.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-16496 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2026-16496?** Check whether you run HashiCorp Terraform-Mcp-Server. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The terraform-mcp-server (versions 0.2.1 through 1.0.0) contains an authorization bypass in its stateful streamable-HTTP transport mode. The vulnerability stems from the per-session Terraform client cache using the MCP session ID as the sole lookup key without binding cached clients to the specific token that created them. An attacker who obtains a victim's session ID can submit requests that the server executes using the victim's cached Terraform bearer token. This allows the attacker to access any Terraform resources (organizations, workspaces, variables) within the scope of the hijacked token. The issue is fixed in version 1.1.0; deployments using stdio or stateless HTTP modes are not affected.

## Affected products

- HashiCorp terraform-mcp-server 0.2.1 up to and including 1.0.0

## Timeline

- 2026-07-28: disclosed
- 2026-07-28: advisory
- 2026-07-28: patched: Fixed in version 1.1.0

## References

- [https://discuss.hashicorp.com/t/hcsec-2026-23-multiple-vulnerabilities-impacting-hashicorp-terraform-mcp-server/77606](https://discuss.hashicorp.com/t/hcsec-2026-23-multiple-vulnerabilities-impacting-hashicorp-terraform-mcp-server/77606)

## Related threats

- [HashiCorp terraform-mcp-server cross-tenant credential reuse in stateless mode](https://junglewise.ai/threats/cve-2026-16498-hashicorp-terraform-mcp-server-cross-tenant-credential-reuse-in)
- [HashiCorp terraform-mcp-server SSRF in streamable-HTTP transport](https://junglewise.ai/threats/cve-2026-14869-hashicorp-terraform-mcp-server-ssrf-in-streamable-http-transport)
