# GHSA-q7j3-v8qv-22vq: OpenTofu: Possible arbitrary file read during certain git operations via a maliciously crafted URL

> OpenTofu allows arbitrary file read via malicious git URLs, potentially exposing confidential information to attackers.

- **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:** 19 Jun 2026
- **Also known as:** GO-2026-5571

## What is GHSA-q7j3-v8qv-22vq?

GHSA-q7j3-v8qv-22vq is a path traversal vulnerability in github.com/opentofu/opentofu, published on 19 Jun 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
Possible data exposure.
#### Summary
While downloading packages from a maliciously crafted URL, some git operations against that URL could allow arbitrary file read.
This might allow disclosure of confidential information.

#### Details
OpenTofu relies on [go-getter](https://github.com/hashicorp/go-getter) for downloading packages like providers and modules. While doing so from a maliciously crafted URL, the operator could be affected by confidential information disclosure. 

The go-getter maintainers have recently published [CVE-2026-4660](https://github.com/advisories/GHSA-92mm-2pjq-r785) for this library which indirectly affects OpenTofu's behavior.

Typical use of OpenTofu already requires caution in selection of URLs that are used to download modules and providers.

### Patches
OpenTofu v1.11.10 and v1.12.3 address these vulnerabilities by upgrading to the [hashicorp/go-getter@v1.8.6](https://github.com/hashicorp/go-getter/releases/tag/v1.8.6) that fixes this vulnerability.

The OpenTofu v1.10 series is also impacted by these vulnerabilities. However, that series is built with an older version of the library and upgrading it risks breaking the whole v1.10 series. 
For those using OpenTofu v1.10 releases, we recommend planning an upgrade to OpenTofu v1.11.10 in the near future.

### References
* [Initial report](https://github.com/opentofu/opentofu/pull/4288)
* [CVE-2026-4660](https://github.com/advisories/GHSA-92mm-2pjq-r785)
* [OpenTofu v1.12 patch](https://github.com/opentofu/opentofu/pull/4293)
* [OpenTofu v1.11 patch](https://github.com/opentofu/opentofu/pull/4292)
* [Patched v1.12.3 version](https://github.com/opentofu/opentofu/releases/tag/v1.12.3)
* [Patched v1.11.10 version](https://github.com/opentofu/opentofu/releases/tag/v1.11.10)

## Which versions are affected by GHSA-q7j3-v8qv-22vq?

5 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.10, 1.12.3 |
| `github.com/opentofu/opentofu` | Go | All versions | 1.11.10 |
| `github.com/opentofu/opentofu` | Go | All versions | 1.11.10 |
| `github.com/opentofu/opentofu` | Go | From 1.12.0-beta1 | 1.12.3 |
| `github.com/opentofu/opentofu` | Go | From 1.12.0-beta1 | 1.12.3 |

## How do I fix GHSA-q7j3-v8qv-22vq?

Upgrade github.com/opentofu/opentofu to a fixed version for your release line: 1.11.10 or 1.12.3.

## Is GHSA-q7j3-v8qv-22vq being exploited?

There is no known exploitation of GHSA-q7j3-v8qv-22vq in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-q7j3-v8qv-22vq and fix it if it is affected.

What it is: GHSA-q7j3-v8qv-22vq is a path traversal vulnerability in github.com/opentofu/opentofu, published on 19 Jun 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-q7j3-v8qv-22vq 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.10, 1.12.3
- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.11.10
- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.11.10
- github.com/opentofu/opentofu (Go): affected from 1.12.0-beta1; fixed in 1.12.3
- github.com/opentofu/opentofu (Go): affected from 1.12.0-beta1; fixed in 1.12.3

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-q7j3-v8qv-22vq/ (Markdown: https://insights.sbomify.com/GHSA-q7j3-v8qv-22vq/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-q7j3-v8qv-22vq

---
From sbomify Insights: https://insights.sbomify.com/GHSA-q7j3-v8qv-22vq/
Summaries are generated and may contain mistakes; the official description above is the record.
