Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/go-git/go-git/v6
  4. ›
  5. CVE-2026-45022

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

May 11, 2026

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.

References

  • github.com/advisories/GHSA-389r-gv7p-r3rp
  • github.com/go-git/go-git/security/advisories/GHSA-389r-gv7p-r3rp
  • nvd.nist.gov/vuln/detail/CVE-2026-45022

Code Behaviors & Features

Detect and mitigate CVE-2026-45022 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 6.0.0-alpha.1 before 6.0.0-alpha.3

Fixed versions

  • 6.0.0-alpha.3

Solution

Upgrade to version 6.0.0-alpha.3 or above.

Impact 6.3 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-180: Incorrect Behavior Order: Validate Before Canonicalize
  • CWE-345: Insufficient Verification of Data Authenticity

Source file

go/github.com/go-git/go-git/v6/CVE-2026-45022.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 06 Jun 2026 00:17:46 +0000.