CVE-2026-45022

CVE-2026-45022 is a high-severity security vulnerability in github.com/go-git/go-git/v6 (go), affecting versions >= 6.0.0-alpha.1, <= 6.0.0-alpha.2. It is fixed in 6.0.0-alpha.3, 5.19.0.

Summary

Credit

Thanks to @bugbunny-research (https://bugbunny.ai/) for reporting this to sigstore/gitsign, and to @wlynch, @patzielinski and @adityasaky for coordinating the disclosure with the go-git project. :bow: :1st_place_medal:

Thanks to @wayphinder for reporting this to the go-git project. :bow:

Impact

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.

Affected versions

github.com/go-git/go-git/v6 (>= 6.0.0-alpha.1, <= 6.0.0-alpha.2) github.com/go-git/go-git/v5 (< 5.19.0)

Security releases

github.com/go-git/go-git/v6 → 6.0.0-alpha.3 (go) github.com/go-git/go-git/v5 → 5.19.0 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Users should upgrade to a patched version in order to mitigate this vulnerability. Versions prior to v5 are likely to be affected, users are recommended to upgrade to a supported go-git version.

Frequently Asked Questions

  1. What is CVE-2026-45022? CVE-2026-45022 is a high-severity security vulnerability in github.com/go-git/go-git/v6 (go), affecting versions >= 6.0.0-alpha.1, <= 6.0.0-alpha.2. It is fixed in 6.0.0-alpha.3, 5.19.0.
  2. Which packages are affected by CVE-2026-45022?
    • github.com/go-git/go-git/v6 (go) (versions >= 6.0.0-alpha.1, <= 6.0.0-alpha.2)
    • github.com/go-git/go-git/v5 (go) (versions < 5.19.0)
  3. Is there a fix for CVE-2026-45022? Yes. CVE-2026-45022 is fixed in 6.0.0-alpha.3, 5.19.0. Upgrade to this version or later.
  4. Is CVE-2026-45022 exploitable, and should I be worried? Whether CVE-2026-45022 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-45022 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-45022?
    • Upgrade github.com/go-git/go-git/v6 to 6.0.0-alpha.3 or later
    • Upgrade github.com/go-git/go-git/v5 to 5.19.0 or later

Other vulnerabilities in github.com/go-git/go-git/v6

Stop the waste.
Protect your environment with Kodem.