# CVE-2026-45570: go-git: Improper single-quote escaping in go-git SSH transport

- Severity: Low 2.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 32% of CVEs (2026-12-01)
- Published: 2026-05-19T15:21:01.000Z
- Modified: 2026-09-10T03:51:06.296Z
- Also known as: GHSA-m7cr-m3pv-hgrp, GO-2026-5496
- Related: CGA-4fx8-v7vx-v65m
- Weaknesses: CWE-116
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- go-git go-git: < 5.19.1; >= 6.0.0-alpha.1, < 6.0.0-alpha.4
- github.com/go-git/go-git/v5 (Go): before 5.19.1
- github.com/go-git/go-git/v6 (Go): before 6.0.0-alpha.4
- github.com/go-git/go-git (Go): up to 4.7.0; all versions
- go-git_project go-git: before 5.19.1; 6.0.0

## Every score

- GitHub_M: CVSS:4.0 2.3 Low `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`
- GitHub: CVSS:4.0 Low `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`
- NVD: CVSS:3.1 9.6 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`

## References

- <https://github.com/go-git/go-git/security/advisories/GHSA-m7cr-m3pv-hgrp> (advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-45570> (advisory)
- <https://github.com/go-git/go-git> (package)

## Sources

- CVE List: [CVE-2026-45570](https://www.cve.org/CVERecord?id=CVE-2026-45570), CVE Terms of Use, modified 2026-05-28
- GitHub Advisory Database: [GHSA-m7cr-m3pv-hgrp](https://github.com/advisories/GHSA-m7cr-m3pv-hgrp), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2026-5496](https://pkg.go.dev/vuln/GO-2026-5496), CC-BY-4.0, modified 2026-07-10
- NVD: [CVE-2026-45570](https://nvd.nist.gov/vuln/detail/CVE-2026-45570), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-45570 · Whole record: https://cve.day/CVE-2026-45570.json · Rebuilt by cve.day 2026-11-25T22:59:22.597Z
