Vulnerability · Published Aug 7, 2026 · Assigned by GitHub_M

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

Medium 6.3

In plain English

A medium-severity path traversal in go-git from go-git. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 36% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.3Medium
Exploit odds (30 days)0.4%top 64.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12golang-github-go-git-go-gitno fix listedDEBIAN-CVE-2026-71557
Debian:13golang-github-go-git-go-gitno fix listedDEBIAN-CVE-2026-71557
Debian:14golang-github-go-git-go-git5.19.2-1DEBIAN-CVE-2026-71557
Debian:14golang-github-go-git-go-git-v66.0.0~alpha.5-1DEBIAN-CVE-2026-71557
Gogithub.com/go-git/go-git/v55.19.2GHSA-qgq7-7hm3-q39j
Gogithub.com/go-git/go-git/v55.19.2GO-2026-6214
Gogithub.com/go-git/go-git/v66.0.0-alpha.5GO-2026-6214
Gogithub.com/go-git/go-git/v66.0.0-alpha.5GHSA-qgq7-7hm3-q39j
Ubuntu:26.10golang-github-go-git-go-gitno fix listedUBUNTU-CVE-2026-71557
Ubuntu:26.10golang-github-go-git-go-git-v6no fix listedUBUNTU-CVE-2026-71557

Affected products (as reported)

VendorProductVersions
go-git go-git < 5.19.2>= 6.0.0-alpha.1, < 6.0.0-alpha.5

Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L

References