{"id":"CVE-2026-45022","aliases":["CVE-2026-45022","GHSA-389r-gv7p-r3rp","GO-2026-5074"],"related":["CGA-8x53-pqv6-wqhw"],"kind":"vulnerability","state":"published","title":"go-git: Improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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:","format":"markdown","source":"ghsa"},{"lang":"en","text":"Go-git: Improper parsing of specially crafted objects may lead to inconsistent interpretation in github.com/go-git/go-git","format":"markdown","source":"go"}],"published":"2026-05-11T14:48:12.000Z","modified":"2026-09-10T03:51:04.377Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-180","CWE-345"],"affected":[{"ranges":[{"version":"< 5.19.0","status":"affected"},{"version":">= 6.0.0-alpha.1, < 6.0.0-alpha.3","status":"affected"}],"vendor":"go-git","product":"go-git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"6.0.0-alpha.1","status":"affected","fixed":"6.0.0-alpha.3"}],"ecosystem":"Go","package":"github.com/go-git/go-git/v6","purl":"pkg:golang/github.com/go-git/go-git/v6","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.19.0"}],"ecosystem":"Go","package":"github.com/go-git/go-git/v5","purl":"pkg:golang/github.com/go-git/go-git/v5","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.19.0"}],"ecosystem":"Go","package":"github.com/go-git/go-git/v5","purl":"pkg:golang/github.com/go-git/go-git/v5","source":"go"},{"ranges":[{"status":"affected","fixed":"5.19.0"},{"status":"affected","version":"6.0.0"},{"status":"affected","version":"6.0.0"}],"vendor":"go-git_project","product":"go-git","cpe":"cpe:2.3:a:go-git_project:go-git:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/go-git/go-git/security/advisories/GHSA-389r-gv7p-r3rp","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45022","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/go-git/go-git","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/go-git/go-git/releases/tag/v5.19.0","tags":["web"],"sources":["go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-27T15:42:45.935Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45022","url":"https://www.cve.org/CVERecord?id=CVE-2026-45022","licence":"CVE Terms of Use","modified":"2026-05-27T15:43:32.693Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-389r-gv7p-r3rp","url":"https://github.com/advisories/GHSA-389r-gv7p-r3rp","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:04.377Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5074","url":"https://pkg.go.dev/vuln/GO-2026-5074","licence":"CC-BY-4.0","modified":"2026-08-08T21:41:54.015Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45022","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45022","licence":"Public domain","modified":"2026-06-17T10:51:36.953Z"}],"updatedAt":"2026-11-25T22:59:22.596Z","epss":{"score":0.00159,"percentile":0.05352,"date":"2026-12-01T12:00:22.000Z"}}