Sceawere

Vulnerability Detail

CVE-2026-71557UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

go-git Reference Path Traversal Vulnerability

Vulnerability Metadata

Severity
Medium
Score / CVSS
6.3
Creation Date
20h ago
Vendor
go-git
Product
go-git
Attack Type
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L
Attack Complexity
LOW

Narrative and Response

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.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "6.3",
  "pubDate": "2026-08-07T17:17:10.833Z",
  "pubdate": "2026-08-07T17:17:10.833Z",
  "executiveSummary": "An arbitrary file write vulnerability exists within the go-git library, specifically affecting reference name handling. The flaw stems from a failure to properly sanitize reference names prior to using them in the construction of on-disk file paths within the reference storage directory. Consequently, a maliciously crafted reference name containing directory traversal sequences can be supplied to the library.\nThe primary impact of this vulnerability is arbitrary file write capability outside the intended reference storage directory. This allows an attacker capable of introducing malicious reference names to overwrite or create files on the host filesystem, subject to the permissions of the process executing the go-git library. This introduces critical risk implications, including potential remote code execution or system compromise if sensitive configuration files, binaries, or startup scripts are targeted.\nThe vulnerability affects go-git prior to versions 5.19.2 and 6.0.0-alpha.5. Exploitation requires an attacker to successfully inject or supply a malicious reference name containing path traversal sequences, such as dot-dot-slash patterns, to the vulnerable reference storage mechanism. No complex authentication or network exposure is inherently mandated by the vulnerability itself, as exploitation depends on how the library is integrated and whether untrusted reference inputs are processed.",
  "technicalDetails": "The root cause of the vulnerability resides in the reference storage component of the go-git library. Specifically, when processing reference names, the library fails to validate or sanitize input strings before concatenating them with base directory paths to instantiate on-disk files under the reference storage directory. Because input sanitization and validation checks are absent, strings containing directory traversal sequences (e.g., ../) are permitted to pass directly into path resolution routines.\nThe exploitation method relies on supplying a crafted git reference name containing traversal sequences. When the vulnerable component attempts to persist or interact with the reference on disk, the path construction mechanism resolves the traversal sequences, causing the resulting file operations to target directories outside the intended sandbox boundary of the reference storage directory.\nThe step-by-step attack flow proceeds as follows: First, an attacker crafts a malicious reference name incorporating relative path traversal tokens. Second, this reference name is introduced to the go-git library through repository operations that handle references. Third, the vulnerable reference storage component attempts to construct the filesystem path for the reference using the unsanitized input. Fourth, the path resolution mechanism navigates upward through the directory hierarchy outside the designated storage root. Fifth, the library performs a file write operation, resulting in the creation or overwriting of an arbitrary file on the underlying filesystem at the target location.\nThe affected components are the reference storage mechanisms within go-git prior to versions 5.19.2 and 6.0.0-alpha.5. The vulnerability manifests locally during reference processing workflows. The privileges required for exploitation are defined by the execution context of the application utilizing the go-git library, wherein any component processing untrusted git repositories or reference inputs may inadvertently trigger the insecure path construction behavior."
}
CVE-2026-71557: go-git Reference Path Traversal Vulnerability (MEDIUM Severity, CVSS: 6.3) - Sceawere