GHSA-pxh5-6rrc-8rjv: OpenTofu Remote Code Execution Vulnerability

LOW
CVSS 3.1
CWE-835
Published
Advisory Summary

GHSA-pxh5-6rrc-8rjv is a LOW (CVSS 3.1) remote code execution vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting OpenTofu libraries in the Go ecosystem. The issue involves excessive resource usage in "tofu init" when installing dependencies from attacker-controlled server. Remediation is available by upgrading affected packages to version 1.11.8.

GHSA-pxh5-6rrc-8rjv at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-pxh5-6rrc-8rjv
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product OpenTofu
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
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-pxh5-6rrc-8rjv

To remediate this vulnerability, upgrade all affected 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.11.8
Upgrade github.com/opentofu/opentofu to 1.11.8
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-pxh5-6rrc-8rjv, inspect your project dependencies for OpenTofu:

inspect dependencies for github.com/opentofu/opentofu

Analyze the terminal output to locate any version of 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.8), 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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In 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 installing provider or module packages from attacker-controlled servers, the server may cause `tofu init`to enter an infinite loop sending garbage data to that server. Those 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. 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. These vulnerabilities **do not** permit arbitrary code execution or allow disclosure of confidential information. ### Details OpenTofu relies a third-party implementations of HTTP2 from the standard library of the Go programming language. The Go project has recently published the following advisory for that implementation, which indirectly affects OpenTofu's behavior: - [CVE-2026-33814](https://www.cve.org/CVERecord?id=CVE-2026-33814): Infinite loop in HTTP/2 transport when given bad SETTINGS_MAX_FRAME_SIZE in net/http/internal/http2 in golang.org/x/net OpenTofu'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 described problem would occur before OpenTofu actually retrieves a dependency package and performs checksum verification, because it affect the transport of the packages rather than the content of the packages. An attacker can exploit this by controlling the HTTP2 implementation of the server where the dependencies are hosted, causing it to send a crafted "SETTINGS" frame which sets the maximum frame size to zero. However, 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. ### Patches OpenTofu v1.11.8 addresses this vulnerability by being built against Go 1.25.10, which contains an improved version of the upstream implementation. The OpenTofu v1.10 and v1.9 series are also impacted by this vulnerability. However, those series are built with a version of Go for which no upstream fix is available. Adopting Go 1.25.10 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.8 in the near future, and reviewing the Workarounds section below in the meantime. ### Workarounds This vulnerability 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. Successful exploitation requires that the attacker control an HTTP2 server that `tofu init` would contact during dependency installation. Note that OpenTofu modules can have their own dependencies on other providers and 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. ### References - [OpenTofu v1.11.8 Release Notes](https://github.com/opentofu/opentofu/releases/tag/v1.11.8) - https://github.com/opentofu/opentofu/pull/4098 - https://github.com/opentofu/opentofu/issues/4094

GHSA-pxh5-6rrc-8rjv Affected OpenTofu Versions

1 component(s)
Fixed Versions:
1.11.8
Product / Package Ecosystem Affected Versions Fixed Version
github.com/opentofu/opentofu
Go
< 1.11.8
1.11.8

References

Frequently Asked Questions

What is GHSA-pxh5-6rrc-8rjv?
GHSA-pxh5-6rrc-8rjv is a security vulnerability in OpenTofu involving Excessive resource usage in "tofu init" when installing dependencies from attacker-controlled server under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which OpenTofu versions are affected?
Affected versions include releases prior to 1.11.8 across affected packages: github.com/opentofu/opentofu.
What version fixes GHSA-pxh5-6rrc-8rjv?
Upgrading to 1.11.8 (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.11.8. Upgrade your dependency to 1.11.8 or later.
What is the CVSS score of GHSA-pxh5-6rrc-8rjv?
GHSA-pxh5-6rrc-8rjv has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L.
What CWE is associated with GHSA-pxh5-6rrc-8rjv?
GHSA-pxh5-6rrc-8rjv is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check Go dependencies for GHSA-pxh5-6rrc-8rjv?
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-pxh5-6rrc-8rjv",
  "modified" : "2026-05-20T15:35:45Z",
  "published" : "2026-05-20T15:35:45Z",
  "aliases" : [ ],
  "summary" : "OpenTofu: Excessive resource usage in \"tofu init\" when installing dependencies from attacker-controlled server",
  "details" : "### Impact\nUnauthenticated denial of service.\n\n### Summary\n\nWhen installing provider or module packages from attacker-controlled servers, the server may cause `tofu init`to enter an infinite loop sending garbage data to that server.\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. 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 a third-party implementations of HTTP2 from the standard library of the Go programming language.\n\nThe Go project has recently published the following advisory for that implementation, which indirectly affects OpenTofu's behavior:\n\n- [CVE-2026-33814](https://www.cve.org/CVERecord?id=CVE-2026-33814):  Infinite loop in HTTP/2 transport when given bad SETTINGS_MAX_FRAME_SIZE in net/http/internal/http2 in golang.org/x/net\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 described problem would occur before OpenTofu actually retrieves a dependency package and performs checksum verification, because it affect the transport of the packages rather than the content of the packages.\n\nAn attacker can exploit this by controlling the HTTP2 implementation of the server where the dependencies are hosted, causing it to send a crafted \"SETTINGS\" frame which sets the maximum frame size to zero.\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.8 addresses this vulnerability by being built against Go 1.25.10, which contains an improved version of the upstream implementation.\n\nThe OpenTofu v1.10 and v1.9 series are also impacted by this vulnerability. However, those series are built with a version of Go for which no upstream fix is available. Adopting Go 1.25.10 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.8 in the near future, and reviewing the Workarounds section below in the meantime.\n\n### Workarounds\n\nThis vulnerability 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 an HTTP2 server that `tofu init` would contact during dependency installation. Note that OpenTofu modules can have their own dependencies on other providers and 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.\n\n### References\n\n- [OpenTofu v1.11.8 Release Notes](https://github.com/opentofu/opentofu/releases/tag/v1.11.8)\n- https://github.com/opentofu/opentofu/pull/4098\n- https://github.com/opentofu/opentofu/issues/4094",
  "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.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/security/advisories/GHSA-pxh5-6rrc-8rjv"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/issues/4094"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/pull/4098"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/opentofu/opentofu"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opentofu/opentofu/releases/tag/v1.11.8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-20T15:35:45Z",
    "nvd_published_at" : null
  }
}