Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 72%

V5: go-git: Malicious reference names may modify files outside the reference storage (CVE-2026-71557)

0
Medium
Published: 08/07/2026 (08/07/2026, 16:41:51 UTC)
Source: GCVE Database
Product: github.com/go-git/go-git/v5

Description

A path traversal vulnerability in go-git allows malicious reference names to access files outside the intended reference storage in filesystem-backed repositories. This occurs because reference names were used as filesystem paths without proper validation, enabling crafted names like refs/heads/../../config to escape the .git directory. The issue affects applications using the storage/filesystem package and dotgit reference storage, but not those using in-memory storage. A fix is available that validates and rejects unsafe reference names. Users should upgrade to a patched version and avoid untrusted Git servers until patched.

CVSS v3.1

Score 6.3medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L

Affected software

Goghsa
github.com/go-git/go-git/v5
Affected versions
<5.19.2
Goghsa
github.com/go-git/go-git/v6
Affected versions
<6.0.0-alpha.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/08/2026, 15:40:06 UTC

Technical Analysis

The go-git library contains a path traversal vulnerability (CVE-2026-71557) in its handling of reference names when using filesystem-backed storage. Reference names were used directly as filesystem paths without verifying that the resolved path remained within the .git reference storage directory. Malicious reference names such as refs/heads/../../config could cause the library to access or modify files outside the intended storage, including critical repository metadata files like .git/config or .git/HEAD. This vulnerability can be triggered when interacting with a malicious Git server that advertises crafted reference names. The flaw does not affect in-memory storage implementations. The issue has been fixed by adding validation at dotgit storage entry points to reject reference names that resolve outside the reference storage. Users of filesystem-backed storage should upgrade to a fixed version to mitigate this risk.

Potential Impact

An attacker controlling a Git server or reference names can cause a client using go-git with filesystem-backed storage to access or modify files outside the repository's reference storage. This can lead to unauthorized modification of repository metadata files, potentially impacting repository integrity. The vulnerability does not affect confidentiality but impacts integrity and availability to a limited extent. Exploitation requires interaction with a malicious Git server or processing attacker-controlled reference names. The CVSS 3.1 score is 6.3 (medium severity), reflecting network attack vector, low complexity, low privileges required, and user interaction needed.

Mitigation Recommendations

A patch is available that validates reference names at the dotgit storage entry points and rejects those that could escape the reference storage directory. Users of filesystem-backed storage should upgrade to a patched version of go-git (versions >=5.19.2 and excluding 6.0.0-alpha.5). Applications using only in-memory storage are not affected and require no action. Until upgrading, avoid cloning or fetching from untrusted Git servers. Application-level validation of reference names can be a temporary mitigation but does not replace upgrading to a fixed version.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-qgq7-7hm3-q39j
Osv Schema Version
1.4.0
Aliases
["CVE-2026-71557"]
Ecosystems
["Go"]
Database Specific Severity
MODERATE
Cvss Version
3.1

Threat ID: 6a77432dbf8831d539b461e0

Added to database: 08/08/2026, 14:54:37 UTC

Last enriched: 08/08/2026, 15:40:06 UTC

Last updated: 08/09/2026, 00:49:47 UTC

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses