CVE-2026-45022: Github.com/go git/go git/v6 Go-git's Improper Parsing Of Specially Vulnerability

HIGH
Advisory Identifier: GHSA-389r-gv7p-r3rp
CWE-345 CWE-180
Published
Advisory Summary

CVE-2026-45022 is a HIGH go-git's improper parsing of specially vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Github.com/go git/go git/v6 libraries in the Go ecosystem. The issue involves go-git's improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream git. Remediation is available by upgrading affected packages to version 6.0.0-alpha.3, 5.19.0.

CVE-2026-45022 at a Glance

CVE Identifier CVE-2026-45022
GHSA Identifier GHSA-389r-gv7p-r3rp
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Github.com/go git/go git/v6
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-45022

To remediate this vulnerability, upgrade all affected Github.com/go git/go git/v6 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/go-git/go-git/v6 fixed: 6.0.0-alpha.3
Upgrade github.com/go-git/go-git/v6 to 6.0.0-alpha.3
github.com/go-git/go-git/v5 fixed: 5.19.0
Upgrade github.com/go-git/go-git/v5 to 5.19.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/go-git/go-git/v6

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-45022, inspect your project dependencies for Github.com/go git/go git/v6:

inspect dependencies for github.com/go-git/go-git/v6

Analyze the terminal output to locate any version of Github.com/go git/go git/v6 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.0-alpha.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Github.com/go git/go git/v6, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-45022 Affected Github.com/go git/go git/v6 Versions

2 component(s)
Fixed Versions:
6.0.0-alpha.35.19.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-git/go-git/v6
Go
≥ 6.0.0-alpha.1
< 6.0.0-alpha.3
6.0.0-alpha.3
github.com/go-git/go-git/v5
Go
< 5.19.0
5.19.0

References

Frequently Asked Questions

What is CVE-2026-45022?
CVE-2026-45022 is a security vulnerability in Github.com/go git/go git/v6 involving go-git's improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git under CWE-345: Insufficient Verification of Data Authenticity.
Which Github.com/go git/go git/v6 versions are affected?
Affected versions include releases prior to 6.0.0-alpha.3, 5.19.0 across affected packages: github.com/go-git/go-git/v6, github.com/go-git/go-git/v5.
What version fixes CVE-2026-45022?
Upgrading to 6.0.0-alpha.3, 5.19.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-git/go-git/v6 affected?
Yes, github.com/go-git/go-git/v6 is affected in releases prior to 6.0.0-alpha.3. Upgrade your dependency to 6.0.0-alpha.3 or later.
Is github.com/go-git/go-git/v5 affected?
Yes, github.com/go-git/go-git/v5 is affected in releases prior to 5.19.0. Upgrade your dependency to 5.19.0 or later.
What CWE is associated with CVE-2026-45022?
CVE-2026-45022 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check Go dependencies for CVE-2026-45022?
Run the dependency tree command: 'inspect dependencies for github.com/go-git/go-git/v6'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-389r-gv7p-r3rp",
  "modified" : "2026-06-08T23:42:41Z",
  "published" : "2026-05-11T14:48:12Z",
  "aliases" : [ "CVE-2026-45022" ],
  "summary" : "go-git's improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git",
  "details" : "### Impact\n`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.\n\nAdditionally, `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.\n\nThis 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.\n\n### Patches\nUsers 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.\n\n### Credit\n\nThanks 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: \n\nThanks to @wayphinder for reporting this to the `go-git` project. :bow:",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-git/go-git/v6"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0-alpha.1"
      }, {
        "fixed" : "6.0.0-alpha.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.0.0-alpha.2"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-git/go-git/v5"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.19.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-git/go-git/security/advisories/GHSA-389r-gv7p-r3rp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45022"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-git/go-git"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-180", "CWE-345" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-11T14:48:12Z",
    "nvd_published_at" : "2026-05-27T15:16:29Z"
  }
}