GHSA-22w5-2fxg-vrwx: Github.com/opentofu/opentofu OpenTofu Has High CPU Usage Vulnerability

LOW
CVSS 2.6
CWE-400
Published
Advisory Summary

GHSA-22w5-2fxg-vrwx is a LOW (CVSS 2.6) opentofu has high cpu usage vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/opentofu/opentofu libraries in the Go ecosystem. The issue involves opentofu has high cpu usage when using k8s remote state backend or when parsing specifically crafted tls certificates from untrusted or compromised servers. Remediation is available by upgrading affected packages to version 1.12.2, 1.11.9.

GHSA-22w5-2fxg-vrwx at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-22w5-2fxg-vrwx
Severity LOW
CVSS v3.1 Base Score 2.6
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Github.com/opentofu/opentofu
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 2.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix GHSA-22w5-2fxg-vrwx

To remediate this vulnerability, upgrade all affected Github.com/opentofu/opentofu dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/opentofu/opentofu fixed: 1.12.2
Upgrade github.com/opentofu/opentofu to 1.12.2
github.com/opentofu/opentofu fixed: 1.11.9
Upgrade github.com/opentofu/opentofu to 1.11.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/opentofu/opentofu

How to Check if You Are Affected

To determine whether your application is affected by GHSA-22w5-2fxg-vrwx, inspect your project dependencies for Github.com/opentofu/opentofu:

inspect dependencies for github.com/opentofu/opentofu

Analyze the terminal output to locate any version of Github.com/opentofu/opentofu in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/opentofu/opentofu, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Unauthenticated denial of service. ### Summary 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](https://www.cve.org/CVERecord?id=CVE-2026-42504): Quadratic complexity in WordDecoder.DecodeHeader in mime - [CVE-2026-27145](https://www.cve.org/CVERecord?id=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. ### Patches 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.

GHSA-22w5-2fxg-vrwx Affected Github.com/opentofu/opentofu Versions

2 component(s)
Fixed Versions:
1.12.21.11.9
Product / Package Ecosystem Affected Versions Fixed Version
github.com/opentofu/opentofu
Go
≥ 1.12.0-beta1
< 1.12.2
1.12.2
github.com/opentofu/opentofu
Go
< 1.11.9
1.11.9

References

Frequently Asked Questions

What is GHSA-22w5-2fxg-vrwx?
GHSA-22w5-2fxg-vrwx is a security vulnerability in Github.com/opentofu/opentofu involving OpenTofu has high CPU usage when using K8S remote state backend or when parsing specifically crafted TLS certificates from untrusted or compromised servers under CWE-400: Uncontrolled Resource Consumption.
Which Github.com/opentofu/opentofu versions are affected?
Affected versions include releases prior to 1.12.2, 1.11.9 across affected packages: github.com/opentofu/opentofu.
What version fixes GHSA-22w5-2fxg-vrwx?
Upgrading to 1.12.2, 1.11.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/opentofu/opentofu affected?
Yes, github.com/opentofu/opentofu is affected in releases prior to 1.12.2, 1.11.9. Upgrade your dependency to 1.12.2, 1.11.9 or later.
What is the CVSS score of GHSA-22w5-2fxg-vrwx?
GHSA-22w5-2fxg-vrwx has a CVSS v3.1 base score of 2.6 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L.
What CWE is associated with GHSA-22w5-2fxg-vrwx?
GHSA-22w5-2fxg-vrwx is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for GHSA-22w5-2fxg-vrwx?
Run the dependency tree command: 'inspect dependencies for github.com/opentofu/opentofu'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-22w5-2fxg-vrwx",
  "modified" : "2026-08-20T18:36:22Z",
  "published" : "2026-08-20T18:36:22Z",
  "aliases" : [ ],
  "summary" : "OpenTofu has high CPU usage when using K8S remote state backend or when parsing specifically crafted TLS certificates from untrusted or compromised servers",
  "details" : "### Impact\n\nUnauthenticated denial of service.\n\n### Summary\n\nWhen 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.\n\nThese vulnerabilities **do not** permit arbitrary code execution or allow disclosure of confidential information.\n\n### Details\n\nOpenTofu relies on third-party implementations of TLS certificate verification and HTTP request execution from the standard library of the Go programming language.\n\nThe Go project has recently published the following advisories for those implementations which indirectly affect OpenTofu's behavior:\n\n- [CVE-2026-42504](https://www.cve.org/CVERecord?id=CVE-2026-42504): Quadratic complexity in WordDecoder.DecodeHeader in mime\n- [CVE-2026-27145](https://www.cve.org/CVERecord?id=CVE-2026-27145): Inefficient candidate hostname parsing in crypto/x509\n\nCVE-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. \nIn 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.\n\nCVE-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.\n\nTypical use of OpenTofu already requires caution in selection of third-party dependencies.\n\n### Patches\n\nOpenTofu 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).\n\nThe 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/opentofu/opentofu"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.12.0-beta1"
      }, {
        "fixed" : "1.12.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/opentofu/opentofu"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/security/advisories/GHSA-22w5-2fxg-vrwx"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/issues/4242"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/issues/4243"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/issues/4244"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/opentofu/opentofu"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/releases/tag/v1.11.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/releases/tag/v1.12.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-20T18:36:22Z",
    "nvd_published_at" : null
  }
}