CVE-2026-45571

go-git: Crafted repositories may modify main and submodule .git directories

Published May 27, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-crhj-59gh-8x96 go-git: Crafted repositories may modify main and submodule .git directories
History
Type Values Removed Values Added
First Time appeared Go-git Project
Go-git Project go-git
CPEs cpe:2.3:a:go-git_project:go-git:*:*:*:*:*:go:*:*
cpe:2.3:a:go-git_project:go-git:6.0.0:alpha1:*:*:*:go:*:*
cpe:2.3:a:go-git_project:go-git:6.0.0:alpha2:*:*:*:go:*:*
cpe:2.3:a:go-git_project:go-git:6.0.0:alpha3:*:*:*:go:*:*
Vendors & Products Go-git Project
Go-git Project go-git
Type Values Removed Values Added
First Time appeared Go-git
Go-git go-git
Vendors & Products Go-git
Go-git go-git
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title go-git: Crafted repositories may modify main and submodule .git directories
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 27, 2026, 4:03 PM
Reserved
May 12, 2026, 7:00 PM
Status
Analyzed
Published
May 27, 2026, 3:16 PM
Modified
Jun 17, 2026, 10:52 AM