GHSA-hw5x-4r37-72w7: Github.com/opentofu/opentofu OpenTofu Has Unbounded Memory Usage, Vulnerability
LOWGHSA-hw5x-4r37-72w7 is a LOW (CVSS 3.1) opentofu has unbounded memory usage, vulnerability (CWE-1395: Dependency on Vulnerable Third-Party Component) affecting Github.com/opentofu/opentofu libraries in the Go ecosystem. The issue involves opentofu has unbounded memory usage, high cpu usage, or deadlock in "tofu init" with maliciously-crafted dependency responses. Remediation is available by upgrading affected packages to version 1.11.6.
GHSA-hw5x-4r37-72w7 at a Glance
Security Impact
CVSS: 3.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L).
How to Fix GHSA-hw5x-4r37-72w7
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.
Upgrade github.com/opentofu/opentofu to 1.11.6
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-hw5x-4r37-72w7, 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.11.6), 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-1395: Dependency on Vulnerable Third-Party Component, where the product has a dependency on a third-party component that contains one or more known vulnerabilities. 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
GHSA-hw5x-4r37-72w7 Affected Github.com/opentofu/opentofu Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/opentofu/opentofu
|
Go |
< 1.11.6
|
1.11.6
|
References
Frequently Asked Questions
What is GHSA-hw5x-4r37-72w7?
Which Github.com/opentofu/opentofu versions are affected?
What version fixes GHSA-hw5x-4r37-72w7?
Is github.com/opentofu/opentofu affected?
What is the CVSS score of GHSA-hw5x-4r37-72w7?
What CWE is associated with GHSA-hw5x-4r37-72w7?
How can I check Go dependencies for GHSA-hw5x-4r37-72w7?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hw5x-4r37-72w7",
"modified" : "2026-04-14T23:34:09Z",
"published" : "2026-04-14T23:34:08Z",
"aliases" : [ ],
"summary" : "OpenTofu has unbounded memory usage, high CPU usage, or deadlock in \"tofu init\" with maliciously-crafted dependency responses",
"details" : "### Impact\n\nUnauthenticated denial of service.\n\n### Summary\n\nWhen installing module packages from attacker-controlled sources, `tofu init` may use unbounded memory, cause high CPU usage, or deadlock when encountering maliciously-crafted TLS certificate chains or tar archives.\n\nThose who depend on modules or providers served from untrusted third-party servers may experience denial of service due to `tofu init` failing to complete successfully. In the case of unbounded memory usage or high CPU usage, other processes running on the same computer as OpenTofu may also fail or have their performance degraded due to the depletion of shared system resources.\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 tar archive extraction 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-32280](https://www.cve.org/CVERecord?id=CVE-2026-32280): Unexpected work during chain building in crypto/x509\n- [CVE-2026-32281](https://www.cve.org/CVERecord?id=CVE-2026-32281): Inefficient policy validation in crypto/x509\n- [CVE-2026-32283](https://www.cve.org/CVERecord?id=CVE-2026-32283): Unauthenticated TLS 1.3 KeyUpdate record can cause persistent connection retention and DoS in crypto/tls\n- [CVE-2026-32288](https://www.cve.org/CVERecord?id=CVE-2026-32288): Unbounded allocation for old GNU sparse in archive/tar\n\nOpenTofu's threat model considers module and package dependencies to be arbitrary third-party code that operators must carefully review after installation. However, these particular problems affect the process of _installing_ these dependencies with `tofu init`, and so can potentially occur before an operator has had the opportunity to review what is being installed. In particular, the TLS-related vulnerabilities can occur before OpenTofu actually retrieves a dependency package and performs checksum verification, because they affect the transport of the packages rather than the content of the packages.\n\nAn attacker can exploit this either by controlling the TLS certificate chain used to authenticate the connection to the server where the dependencies are hosted, or (in the case of module packages only) by controlling the content of a package served when OpenTofu is expecting to receive a package using the \"tar\" archive format with or without compression.\n\nHowever, the attacker must also coerce an OpenTofu operator into attempting dependency installation from the server they control. Typical use of OpenTofu already requires caution in selection of third-party dependencies because they are arbitrary code, and so the vulnerability here is only in the addition of a potential denial of service in the `tofu init` process, which does not execute third-party dependency code itself.\n\n### Patches\n\nOpenTofu v1.11.6 addresses these vulnerabilities by being built against Go 1.25.9, which contains improved versions of the upstream implementations.\n\nThe OpenTofu v1.10 and v1.9 series are also impacted by these vulnerabilities. However, those series are built with a version of Go for which no upstream fix is available. Adopting Go 1.25.9 for those series would effectively end support for certain versions of macOS, 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 the OpenTofu v1.10 or v1.9 releases we recommend planning to upgrade to OpenTofu v1.11.6 in the near future, and reviewing the Workarounds section below in the meantime.\n\n### Workarounds\n\nThese vulnerabilities can be exploited only if an attacker can coerce an operator to add a dependency from an attacker-controlled source to their configuration before running `tofu init`. Those who are unable to upgrade can therefore minimize risk by reviewing new dependencies _before_ adding them to the configuration, such as by directly fetching the relevant artifacts using software other than OpenTofu.\n\nSuccessful exploitation requires that the attacker control either an HTTPS server that `tofu init` would contact during dependency installation or a tar archive that OpenTofu would fetch and extract during the module installation process. Note that OpenTofu modules can have their own dependencies on other modules, so an attacker could potentially use a module served from a source such as GitHub or the OpenTofu Registry to indirectly request a module from a server they control.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/opentofu/opentofu"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.11.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/security/advisories/GHSA-hw5x-4r37-72w7"
}, {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/issues/4029"
}, {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/issues/4030"
}, {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/issues/4031"
}, {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/issues/4032"
}, {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/pull/3966"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/opentofu/opentofu"
}, {
"type" : "WEB",
"url" : "https://github.com/opentofu/opentofu/releases/tag/v1.11.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1395" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-14T23:34:08Z",
"nvd_published_at" : null
}
}