go-git: Improper single-quote escaping in go-git SSH transport
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| go-git | go-git | before 5.19.1; 6.0.0-alpha.1 to before 6.0.0-alpha.4 | 5.19.1, 6.0.0-alpha.4 | Patch available | CNA |
| — | github.com/go-git/go-git/v5 (Go) | before 5.19.1 | 5.19.1 | Patch available | GHSA-m7cr-m3pv-hgrp |
| — | github.com/go-git/go-git/v6 (Go) | before 6.0.0-alpha.4 | 6.0.0-alpha.4 | Patch available | GHSA-m7cr-m3pv-hgrp |
| — | github.com/go-git/go-git (Go) | up to 4.7.0 | — | No fix listed | GHSA-m7cr-m3pv-hgrp |
- go-git Vendorgo-git Affected before 5.19.1; 6.0.0-alpha.1 to before 6.0.0-alpha.4 Fixed in 5.19.1, 6.0.0-alpha.4 Patch available CNA
- github.com/go-git/go-git/v5 (Go) Vendor— Affected before 5.19.1 Fixed in 5.19.1 Patch available GHSA-m7cr-m3pv-hgrp
- github.com/go-git/go-git/v6 (Go) Vendor— Affected before 6.0.0-alpha.4 Fixed in 6.0.0-alpha.4 Patch available GHSA-m7cr-m3pv-hgrp
- github.com/go-git/go-git (Go) Vendor— Affected up to 4.7.0 Fixed in — No fix listed GHSA-m7cr-m3pv-hgrp
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:go-git_project:go-git:*:*:*:*:*:go:*:* | before 5.19.1 | Vulnerable | go-git |
| cpe:2.3:a:go-git_project:go-git:6.0.0:alpha1:*:*:*:go:*:* | 6.0.0 alpha1 | Vulnerable | go-git |
| cpe:2.3:a:go-git_project:go-git:6.0.0:alpha2:*:*:*:go:*:* | 6.0.0 alpha2 | Vulnerable | go-git |
| cpe:2.3:a:go-git_project:go-git:6.0.0:alpha3:*:*:*:go:*:* | 6.0.0 alpha3 | Vulnerable | go-git |
- cpe:2.3:a:go-git_project:go-git:*:*:*:*:*:go:*:* Versions before 5.19.1 Vulnerable ·go-git
- cpe:2.3:a:go-git_project:go-git:6.0.0:alpha1:*:*:*:go:*:* Versions 6.0.0 alpha1 Vulnerable ·go-git
- cpe:2.3:a:go-git_project:go-git:6.0.0:alpha2:*:*:*:go:*:* Versions 6.0.0 alpha2 Vulnerable ·go-git
- cpe:2.3:a:go-git_project:go-git:6.0.0:alpha3:*:*:*:go:*:* Versions 6.0.0 alpha3 Vulnerable ·go-git
Remediation
- Fix · CNA go-git (go-git) Fixed in 5.19.1, 6.0.0-alpha.4
- Fix · GHSA-m7cr-m3pv-hgrp github.com/go-git/go-git/v5 (Go) Fixed in 5.19.1 Advisory →
- Fix · GHSA-m7cr-m3pv-hgrp github.com/go-git/go-git/v6 (Go) Fixed in 6.0.0-alpha.4 Advisory →
Red Hat 1 advisory
- RHSA-2026:67543 Released 2026-09-15 · Red Hat rating ImportantRed Hat Advanced Cluster Management for Kubernetes v2.17.2 security update
- Red Hat Advanced Cluster Management for Kubernetes 2.17 registry.redhat.io/rhacm2/acm-multicluster-observability-addon-rhel9, registry.redhat.io/rhacm2/console-rhel9, registry.redhat.io/rhacm2/grafana-dashboard-loader-rhel9 +3
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Advanced Cluster Management for Kubernetes 2.17 | Fixed | RHSA-2026:67543 |
Not affected: 1 product
- Red Hat Advanced Cluster Management for Kubernetes 2.17
Timeline
- 2026-10-02 Threatist record created from CVE-2026-45570
- 2026-10-03 Alias added: GHSA-m7cr-m3pv-hgrp
References
More Go-git vulnerabilities
- TI-2023-27070 Maliciously crafted Git server replies can lead to path traversal and RCE on go-git clients CVSS 3.1CRITICAL 9.8
- TI-2025-15573 go-git has an Argument Injection via the URL field CVSS 4.0CRITICAL 9.2
- TI-2025-15574 go-git clients vulnerable to DoS via maliciously crafted Git server replies CVSS 3.1HIGH 7.5
- TI-2023-27069 Maliciously crafted Git server replies can cause DoS on go-git clients CVSS 3.1HIGH 7.5
- TI-2026-30091 go-git Credential leak via cross-host redirect in smart HTTP transport CVSS 3.1HIGH 7.4
- TI-2026-32877 go-git: Improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git CVSS 4.0HIGH 7.0
Sources
- CVE-2026-45570 · CVE Program
- CVE-2026-45570 · NVD
- FIRST EPSS
- GHSA-m7cr-m3pv-hgrp · GitHub Advisory Database · CC BY 4.0
- CVE-2026-45570 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences