CVE-2026-45571
MEDIUM 5.4CVSS 3.1go-git: Crafted repositories may modify main and submodule .git directories
go-git is an extensible git implementation library written in pure Go. Prior to 5.19.1 and 6.0.0-alpha.4, a path validation issue in go-git could allow crafted repository data to affect files outside the intended checkout target, including the repository's .git directory. These validations were introduced in upstream Git years ago, so the vulnerability arose from go-git drifting from those checks. This vulnerability is fixed in 5.19.1 and 6.0.0-alpha.4.
- Published
- 27 May 2026
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-22
- Also known as
- GHSA-crhj-59gh-8x96GO-2026-5336
- Sources
- NVDJSONOSV GHSA-crhj-59gh-8x96JSONOSV GO-2026-5336JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | go-git_project | go-gitcpe:2.3:a:go-git_project:go-git:*:*:*:*:*:go:*:* |
< 5.19.1 | 5.19.1 |
| NVD | go-git_project | go-gitcpe:2.3:a:go-git_project:go-git:6.0.0:alpha1:*:*:*:go:*:* |
= 6.0.0 | |
| NVD | go-git_project | go-gitcpe:2.3:a:go-git_project:go-git:6.0.0:alpha2:*:*:*:go:*:* |
= 6.0.0 | |
| NVD | go-git_project | go-gitcpe:2.3:a:go-git_project:go-git:6.0.0:alpha3:*:*:*:go:*:* |
= 6.0.0 | |
| OSV | Go | github.com/go-git/go-git/v5 | < 5.19.1 | 5.19.1 |
| OSV | Go | github.com/go-git/go-git/v6 | < 6.0.0-alpha.4 | 6.0.0-alpha.4 |
| OSV | Go | github.com/go-git/go-git | <= 44.7.0 |
References
- https://github.com/go-git/go-git/security/advisories/GHSA-crhj-59gh-8x96 · Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-45571 · ADVISORY
- https://github.com/go-git/go-git · PACKAGE
- https://github.com/go-git/go-git/releases/tag/v5.19.1 · WEB
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 27 May 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Jul 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 19 May 2026)