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.

Severity (CVSS 4.0)2.3Low
Exploit odds (30 days)0.4%top 69.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, 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

EcosystemPackageFixed inAdvisory
Debian:12golang-github-go-git-go-gitno fix listedDEBIAN-CVE-2026-45570
Debian:13golang-github-go-git-go-gitno fix listedDEBIAN-CVE-2026-45570
Debian:14golang-github-go-git-go-git5.19.1-1DEBIAN-CVE-2026-45570
Debian:14golang-github-go-git-go-git-v66.0.0~alpha4-1DEBIAN-CVE-2026-45570
Gogithub.com/go-git/go-gitno fix listedGHSA-m7cr-m3pv-hgrp
Gogithub.com/go-git/go-gitno fix listedGO-2026-5496
Gogithub.com/go-git/go-git/v55.19.1GHSA-m7cr-m3pv-hgrp
Gogithub.com/go-git/go-git/v55.19.1GO-2026-5496
Gogithub.com/go-git/go-git/v66.0.0-alpha.4GO-2026-5496
Gogithub.com/go-git/go-git/v66.0.0-alpha.4GHSA-m7cr-m3pv-hgrp
Ubuntu:25.10golang-github-go-git-go-gitno fix listedUBUNTU-CVE-2026-45570
Ubuntu:26.10golang-github-go-git-go-gitno fix listedUBUNTU-CVE-2026-45570

Affected products (as reported)

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

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