CVE-2026-45022 go-git: Improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git

High 7.0 Published Updated

go-git library may incorrectly parse malformed Git objects, causing signature verification to pass for commits with altered metadata.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-45022?

CVE-2026-45022 is a high-severity vulnerability in go-git, published on 27 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.0 and 6.0.0-alpha.3, go-git may parse malformed Git objects in a way that differs from upstream Git. When commit or tag objects contain ambiguous or malformed headers, go-git’s decoded representation may expose values differently from how Git itself would interpret or reject the same object. Additionally, go-git’s commit signing and verification logic operates over commit data reconstructed from go-git’s parsed representation rather than the original raw object bytes. As a result, go-git may sign or verify a commit payload that is not byte-for-byte equivalent to the object stored in the repository. This can cause a signature to appear valid for a commit whose displayed or effective metadata differs from the object that was intended to be signed. This vulnerability is fixed in 5.19.0 and 6.0.0-alpha.3.

Weakness: CWE-345, CWE-180

Which versions are affected by CVE-2026-45022?

5 open source packages ship an affected version, including github.com/go-git/go-git/v5 and github.com/go-git/go-git/v6. It affects 1 product.

PackageAffectedFixed in
github.com/go-git/go-git/v5 GoAll versions5.19.0
github.com/go-git/go-git/v5 GoAll versions5.19.0
github.com/go-git/go-git/v5 GoAll versions5.19.0
github.com/go-git/go-git/v6 GoFrom 6.0.0-alpha.16.0.0-alpha.3
github.com/go-git/go-git/v6 GoFrom 6.0.0-alpha.16.0.0-alpha.3
Linux distribution packages (1)
flux2-cli openSUSE:TumbleweedAll versions2.8.7-1.1

Products include Go-Git Project Go-Git.

How do I fix CVE-2026-45022?

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

Is CVE-2026-45022 being exploited?

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

Sources

Also known as BELL-CVE-2026-45022, CLEANSTART-2026-CD37394, CLEANSTART-2026-QM97024, CLEANSTART-2026-RC37242, CLEANSTART-2026-WJ78227, DEBIAN-CVE-2026-45022 and 183 more.

Is CVE-2026-45022 in your software?

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

Check your SBOMs for free