CVE-2026-71557 is a medium-severity (CVSS 6.3) Path Traversal vulnerability in github.com/go-git/go-git/v5. A fix is available for github.com/go-git/go-git/v5 — see the affected versions and patch details below.
go-git: Malicious reference names may modify files outside the reference storage
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-71557.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2026-71557 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/go-git/go-git/v5🐹github.com/go-git/go-git/v6Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
A path traversal issue in go-git could allow malicious reference names to access files outside the repository's intended reference storage.
Loose references are stored under .git/<reference-name>. The reference name was previously used as a path without verifying that the resolved path remained within the reference storage. A name such as refs/heads/../../config could therefore resolve to unrelated repository metadata such as .git/config or .git/HEAD.
A malicious Git server could advertise such a reference name. The name may also survive refspec mapping; for example, it could be mapped to refs/remotes/origin/../../config during a clone or fetch operation.
This vulnerability affects filesystem-backed repositories using the storage/filesystem package and its dotgit reference storage. Users relying exclusively on the in-memory storage implementation, storage/memory, are not affected, because reference names are not resolved as filesystem paths.
Exploitation requires an application using go-git with filesystem-backed storage to interact with a malicious Git server or otherwise process attacker-controlled reference names.
Patches
The issue has been addressed by validating reference names at the dotgit storage entry points and rejecting names whose resolved paths could escape the reference storage.
Users of filesystem-backed storage should upgrade to a patched version.
Workarounds
Applications that exclusively use storage/memory are not affected and do not require a workaround for this vulnerability.
For applications using filesystem-backed storage, avoid cloning from or fetching from untrusted Git servers until an upgrade is possible.
Applications that directly construct or process reference names may also validate them before passing them to filesystem-backed go-git storage. Application-level validation should only be considered a temporary mitigation and does not replace upgrading to a patched version.
References
Credits
Thanks to @Saku0512 for reporting this issue and @Sahana2524 for proposing the initial fix. 🙇
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/go-git/go-git/v5 | all versions | 5.19.2go get github.com/go-git/go-git/v5@v5.19.2 |
| 🐹Go | github.com/go-git/go-git/v6 | all versions | 6.0.0-alpha.5go get github.com/go-git/go-git/v6@v6.0.0-alpha.5 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/go-git/go-git/v5, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/go-git/go-git/v5 to 5.19.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-71557 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-71557 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-71557. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This is a Moderate impact flaw because it requires user interaction and low privileges, but can lead to unauthorized file modification. The `go-git` library, when processing maliciously crafted reference names, fails to sanitize directory traversal sequences, allowing files to be written outside the intended…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Hardened Images | kube-state-metrics-main-2.20.0-0.2.hum1 | RHSA-2026:66208 |
| Red Hat Hardened Images | trivy-main-0.74.0-0.3.hum1 | RHSA-2026:68281 |
| Red Hat Hardened Images | grype-main-0.119.0-0.1.hum1 | RHSA-2026:68806 |
| Red Hat Hardened Images | syft-main-1.52.0-0.1.hum1 | RHSA-2026:68808 |
Frequently Asked Questions
Is CVE-2026-71557 in your dependencies?
O3 Security finds CVE-2026-71557 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.