Vulnerability · Published May 27, 2026 · Assigned by GitHub_M
CVE-2026-45570go-git: Improper single-quote escaping in go-git SSH transport
Low 2.3
In plain English
A low-severity security flaw 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.4% (higher than 31% 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, 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | golang-github-go-git-go-git | no fix listed | DEBIAN-CVE-2026-45570 |
| Debian:13 | golang-github-go-git-go-git | no fix listed | DEBIAN-CVE-2026-45570 |
| Debian:14 | golang-github-go-git-go-git | 5.19.1-1 | DEBIAN-CVE-2026-45570 |
| Debian:14 | golang-github-go-git-go-git-v6 | 6.0.0~alpha4-1 | DEBIAN-CVE-2026-45570 |
| Go | github.com/go-git/go-git | no fix listed | GHSA-m7cr-m3pv-hgrp |
| Go | github.com/go-git/go-git | no fix listed | GO-2026-5496 |
| Go | github.com/go-git/go-git/v5 | 5.19.1 | GHSA-m7cr-m3pv-hgrp |
| Go | github.com/go-git/go-git/v5 | 5.19.1 | GO-2026-5496 |
| Go | github.com/go-git/go-git/v6 | 6.0.0-alpha.4 | GO-2026-5496 |
| Go | github.com/go-git/go-git/v6 | 6.0.0-alpha.4 | GHSA-m7cr-m3pv-hgrp |
| Ubuntu:25.10 | golang-github-go-git-go-git | no fix listed | UBUNTU-CVE-2026-45570 |
| Ubuntu:26.10 | golang-github-go-git-go-git | no fix listed | UBUNTU-CVE-2026-45570 |
Affected products (as reported)
Weakness: CWE-116 · 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
References
- https://github.com/go-git/go-git/security/advisories/GHSA-m7cr-m3pv-hgrp x_refsource_CONFIRM