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

Medium 6.3 Published Updated

Attackers can use malicious reference names to write files outside the intended directory in the go-git library.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-71557?

CVE-2026-71557 is a medium-severity path traversal vulnerability in go-git, published on 7 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

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.

Weakness: CWE-22

Which versions are affected by CVE-2026-71557?

6 open source packages ship an affected version, including github.com/go-git/go-git/v5 and github.com/go-git/go-git/v6.

PackageAffectedFixed in
github.com/go-git/go-git/v5 GoAll versions5.19.2
github.com/go-git/go-git/v5 GoAll versions5.19.2
github.com/go-git/go-git/v5 GoAll versions5.19.2
github.com/go-git/go-git/v6 GoAll versions6.0.0-alpha.5
github.com/go-git/go-git/v6 GoAll versions6.0.0-alpha.5
github.com/go-git/go-git/v6 GoAll versions6.0.0-alpha.5

How do I fix CVE-2026-71557?

Upgrade github.com/go-git/go-git/v5 to 5.19.2 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-71557 being exploited?

There is no known exploitation of CVE-2026-71557 in the wild and no public exploit code.

Public exploit code: 2 proofs of concept on GitHub.

Sources

Also known as AZL-94673, AZL-95487, CLEANSTART-2026-ME34886, CLEANSTART-2026-MF55431, CLEANSTART-2026-TV37644, CLEANSTART-2026-UK97490 and 249 more.

Is CVE-2026-71557 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free