CVE-2026-45022: Github.com/go git/go git/v6 Go-git's Improper Parsing Of Specially Vulnerability
HIGHCVE-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
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.
Upgrade github.com/go-git/go-git/v6 to 6.0.0-alpha.3
Upgrade github.com/go-git/go-git/v5 to 5.19.0
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
CVE-2026-45022 Affected Github.com/go git/go git/v6 Versions
2 component(s)| 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?
Which Github.com/go git/go git/v6 versions are affected?
What version fixes CVE-2026-45022?
Is github.com/go-git/go-git/v6 affected?
Is github.com/go-git/go-git/v5 affected?
What CWE is associated with CVE-2026-45022?
How can I check Go dependencies for CVE-2026-45022?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}