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.

Severity (CVSS 3.1)5.4Medium
Exploit odds (30 days)0.3%top 77.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12golang-github-go-git-go-gitno fix listedDEBIAN-CVE-2026-45571
Debian:13golang-github-go-git-go-gitno fix listedDEBIAN-CVE-2026-45571
Debian:14golang-github-go-git-go-git5.19.1-1DEBIAN-CVE-2026-45571
Debian:14golang-github-go-git-go-git-v66.0.0~alpha4-1DEBIAN-CVE-2026-45571
Gogithub.com/go-git/go-gitno fix listedGHSA-crhj-59gh-8x96
Gogithub.com/go-git/go-git/v55.19.1GHSA-crhj-59gh-8x96
Gogithub.com/go-git/go-git/v55.19.1GO-2026-5336
Gogithub.com/go-git/go-git/v66.0.0-alpha.4GHSA-crhj-59gh-8x96
Ubuntu:25.10golang-github-go-git-go-gitno fix listedUBUNTU-CVE-2026-45571
Ubuntu:26.10golang-github-go-git-go-gitno fix listedUBUNTU-CVE-2026-45571

Affected products (as reported)

VendorProductVersions
go-git go-git < 5.19.1>= 6.0.0-alpha.1, < 6.0.0-alpha.4

Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L

References