# GHSA-pxh5-6rrc-8rjv: OpenTofu: Excessive resource usage in "tofu init" when installing dependencies from attacker-controlled server

> An attacker controlling a dependency server can cause OpenTofu to enter an infinite loop during initialization, leading to denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 May 2026
- **Also known as:** GO-2026-5558

## What is GHSA-pxh5-6rrc-8rjv?

GHSA-pxh5-6rrc-8rjv is a denial of service vulnerability in github.com/opentofu/opentofu, published on 20 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

### 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

## Which versions are affected by GHSA-pxh5-6rrc-8rjv?

3 open source packages ship an affected version, including github.com/opentofu/opentofu.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/opentofu/opentofu` | Go | All versions | 1.11.8 |
| `github.com/opentofu/opentofu` | Go | All versions | 1.11.8 |
| `github.com/opentofu/opentofu` | Go | All versions | 1.11.8 |

## How do I fix GHSA-pxh5-6rrc-8rjv?

Upgrade github.com/opentofu/opentofu to 1.11.8 or later.

## Is GHSA-pxh5-6rrc-8rjv being exploited?

There is no known exploitation of GHSA-pxh5-6rrc-8rjv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-pxh5-6rrc-8rjv and fix it if it is affected.

What it is: GHSA-pxh5-6rrc-8rjv is a denial of service vulnerability in github.com/opentofu/opentofu, published on 20 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-pxh5-6rrc-8rjv in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.11.8
- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.11.8
- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.11.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-pxh5-6rrc-8rjv/ (Markdown: https://insights.sbomify.com/GHSA-pxh5-6rrc-8rjv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-pxh5-6rrc-8rjv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-pxh5-6rrc-8rjv/
Summaries are generated and may contain mistakes; the official description above is the record.
