CVE-2026-71557
Received Received - Intake

Directory Traversal in go-git Reference Storage

Vulnerability report for CVE-2026-71557, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-07

Last updated on: 2026-08-07

Assigner: GitHub, Inc.

Description

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, reference names are not sanitized before being used to construct on-disk paths under the reference storage directory, so a maliciously crafted reference name (for example containing directory-traversal sequences) can cause go-git to write files outside the intended reference storage directory. Versions 5.19.2 and 6.0.0-alpha.5 fix the issue.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-07
Last Modified
2026-08-07
Generated
2026-08-07
AI Q&A
2026-08-07
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
go-git go-git to 5.19.2 (exc)
go-git go-git to 6.0.0-alpha.5 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a path traversal vulnerability in the go-git library where reference names are not properly sanitized before being used to create on-disk paths. This allows malicious reference names containing directory-traversal sequences to write files outside the intended reference storage directory, potentially accessing or modifying sensitive repository metadata like .git/config.

Detection Guidance

To detect this vulnerability, check the go-git library version in use. Run commands like 'go list -m github.com/go-git/go-git' or inspect dependency files for versions below 5.19.2 or 6.0.0-alpha.5. Look for unexpected file writes in .git directories or suspicious reference names containing path traversal sequences.

Impact Analysis

An attacker could exploit this by crafting a reference name that traverses outside the reference storage directory, allowing them to read, overwrite, or delete unrelated files in the repository. This could lead to unauthorized access to sensitive data, repository corruption, or compromise of repository configuration.

Compliance Impact

This vulnerability could lead to unauthorized access or modification of sensitive data, which may violate compliance requirements such as GDPR (data protection) or HIPAA (health information privacy). Unauthorized changes to repository metadata or data could result in data breaches or integrity violations, triggering regulatory penalties.

Mitigation Strategies

Upgrade go-git to version 5.19.2 or 6.0.0-alpha.5 or later. Avoid using untrusted Git servers or repositories. Validate reference names before processing if upgrading is not immediately possible. Monitor .git directories for unauthorized file modifications.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-71557. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart