Live threats

All CVEs / Go-git Project

CVE-2026-45570Go-git Project Go-git

Low 2.3 No auth needed

Priority
29
CVSS 4.0
2.3
EPSS
—
Auth required
No
Published
May 27, 2026
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-116
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.1 and 6.0.0-alpha.4, go-git's SSH transport constructs the remote exec command by wrapping the repository path in single quotes without escaping single quotes embedded inside the path. A repository path containing a single quote can therefore break out of the quoted region in the exec command and be appended as additional shell tokens. This vulnerability is fixed in 5.19.1 and 6.0.0-alpha.4.

Original NVD text.

What to do

  1. Apply the vendor's security update for Go-git.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go github.com/go-git/go-git ≤ 4.7.0 no fixed version —
Go github.com/go-git/go-git all no fixed version —
Go github.com/go-git/go-git/v5 < 5.19.1 5.19.1 go get github.com/go-git/go-git/v5@v5.19.1
Go github.com/go-git/go-git/v5 < 5.19.1 5.19.1 go get github.com/go-git/go-git/v5@v5.19.1
Go github.com/go-git/go-git/v6 < 6.0.0-alpha.4 6.0.0-alpha.4 go get github.com/go-git/go-git/v6@v6.0.0-alpha.4
Go github.com/go-git/go-git/v6 < 6.0.0-alpha.4 6.0.0-alpha.4 go get github.com/go-git/go-git/v6@v6.0.0-alpha.4

Per OSV / GitHub Advisories (GHSA-m7cr-m3pv-hgrp, GO-2026-5496). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
go-git_projectgo-git< 5.19.1
go-git_projectgo-git6.0.0
go-git_projectgo-git6.0.0
go-git_projectgo-git6.0.0

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.