Vulnerability · Published May 27, 2026 · Assigned by GitHub_M
CVE-2026-45571go-git: Crafted repositories may modify main and submodule .git directories
Medium 5.4
In plain English
A medium-severity path traversal in go-git from go-git. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 23% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | golang-github-go-git-go-git | no fix listed | DEBIAN-CVE-2026-45571 |
| Debian:13 | golang-github-go-git-go-git | no fix listed | DEBIAN-CVE-2026-45571 |
| Debian:14 | golang-github-go-git-go-git | 5.19.1-1 | DEBIAN-CVE-2026-45571 |
| Debian:14 | golang-github-go-git-go-git-v6 | 6.0.0~alpha4-1 | DEBIAN-CVE-2026-45571 |
| Go | github.com/go-git/go-git | no fix listed | GHSA-crhj-59gh-8x96 |
| Go | github.com/go-git/go-git/v5 | 5.19.1 | GHSA-crhj-59gh-8x96 |
| Go | github.com/go-git/go-git/v5 | 5.19.1 | GO-2026-5336 |
| Go | github.com/go-git/go-git/v6 | 6.0.0-alpha.4 | GHSA-crhj-59gh-8x96 |
| Ubuntu:25.10 | golang-github-go-git-go-git | no fix listed | UBUNTU-CVE-2026-45571 |
| Ubuntu:26.10 | golang-github-go-git-go-git | no fix listed | UBUNTU-CVE-2026-45571 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
References
- https://github.com/go-git/go-git/security/advisories/GHSA-crhj-59gh-8x96 x_refsource_CONFIRM