GHSA-22W5-2FXG-VRWX

GHSA-22W5-2FXG-VRWX is a low-severity uncontrolled resource consumption vulnerability in github.com/opentofu/opentofu (go), affecting versions >= 1.12.0-beta1, < 1.12.2. It is fixed in 1.12.2, 1.11.9.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

OpenTofu has high CPU usage when using K8S remote state backend or when parsing specifically crafted TLS certificates from untrusted or compromised servers

When OpenTofu performs requests against an untrusted (or compromised) third-party server or connects to an attacker-controlled server, the initial connection negotiation can produce high CPU usage, leading to possible denial of service.

These vulnerabilities do not permit arbitrary code execution or allow disclosure of confidential information.

Details

OpenTofu relies on third-party implementations of TLS certificate verification and HTTP request execution from the standard library of the Go programming language.

The Go project has recently published the following advisories for those implementations which indirectly affect OpenTofu's behavior:

  • CVE-2026-42504: Quadratic complexity in WordDecoder.DecodeHeader in mime
  • CVE-2026-27145: Inefficient candidate hostname parsing in crypto/x509

CVE-2026-42504 affects OpenTofu's K8S remote state implementation. The operator of a configuration that uses such a backend needs to double-check the trustworthiness of the server used for this purpose.
In situations where the server is untrusted or compromised, an attacker could configure it to respond with an intentionally crafted HTTP response designed to target this specific vulnerability in the Go standard library, potentially leading to high CPU usage.

CVE-2026-27145 has a similar outcome: if an untrusted or compromised third-party server is used, an attacker could craft a specific TLS certificate that targets this vulnerability in the Go standard library, which could also lead to high CPU usage.

Typical use of OpenTofu already requires caution in selection of third-party dependencies.

Impact

Unauthenticated denial of service.

Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service. Typical impact: denial of service.

GHSA-22W5-2FXG-VRWX has a CVSS score of 2.6 (Low). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.12.2, 1.11.9); upgrading removes the vulnerable code path.

Affected versions

github.com/opentofu/opentofu (>= 1.12.0-beta1, < 1.12.2) github.com/opentofu/opentofu (< 1.11.9)

Security releases

github.com/opentofu/opentofu → 1.12.2 (go) github.com/opentofu/opentofu → 1.11.9 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

OpenTofu v1.11.9 and v1.12.2 address these vulnerabilities by upgrading to the Go versions that fix them (v1.25.11 and v1.26.3).

The OpenTofu v1.10 series is also impacted by these vulnerabilities. However, that series is built with a version of Go for which no upstream fix is available. Adopting Go 1.25.11 for that series would effectively end support for certain versions of macOS and Linux, and the OpenTofu Project has determined that the impact of these vulnerabilities is not high enough to justify that disruption in a patch release. For those using OpenTofu v1.10 releases, we recommend planning an upgrade to OpenTofu v1.11.9 in the near future.

Frequently Asked Questions

  1. What is GHSA-22W5-2FXG-VRWX? GHSA-22W5-2FXG-VRWX is a low-severity uncontrolled resource consumption vulnerability in github.com/opentofu/opentofu (go), affecting versions >= 1.12.0-beta1, < 1.12.2. It is fixed in 1.12.2, 1.11.9. Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service.
  2. How severe is GHSA-22W5-2FXG-VRWX? GHSA-22W5-2FXG-VRWX has a CVSS score of 2.6 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/opentofu/opentofu are affected by GHSA-22W5-2FXG-VRWX? github.com/opentofu/opentofu (go) versions >= 1.12.0-beta1, < 1.12.2 is affected.
  4. Is there a fix for GHSA-22W5-2FXG-VRWX? Yes. GHSA-22W5-2FXG-VRWX is fixed in 1.12.2, 1.11.9. Upgrade to this version or later.
  5. Is GHSA-22W5-2FXG-VRWX exploitable, and should I be worried? Whether GHSA-22W5-2FXG-VRWX is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-22W5-2FXG-VRWX is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-22W5-2FXG-VRWX?
    • Upgrade github.com/opentofu/opentofu to 1.12.2 or later
    • Upgrade github.com/opentofu/opentofu to 1.11.9 or later

Other vulnerabilities in github.com/opentofu/opentofu

Stop the waste.
Protect your environment with Kodem.