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

> Attackers can execute arbitrary commands via crafted repository paths in go-git SSH transport due to improper quote escaping.

- **Severity:** Low 2.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 27 May 2026
- **Updated:** 28 May 2026
- **Also known as:** AZL-88418, AZL-88800, BELL-CVE-2026-45570, CLEANSTART-2026-LG29530, CLEANSTART-2026-MD00840, CLEANSTART-2026-OJ94675, CLEANSTART-2026-QV38909, CLEANSTART-2026-YF91950, DEBIAN-CVE-2026-45570, GHSA-m7cr-m3pv-hgrp, GO-2026-5496, MINI-24hr-44fm-q245, MINI-27mm-rr94-fw8w, MINI-2hwr-67cp-gpf5, MINI-2vmw-5w4p-xc22, MINI-2xm9-cvvq-5qpw, MINI-2xp7-vg68-3q4m, MINI-3235-hw4r-7jw6, MINI-37ph-w3mc-ghw7, MINI-3c9f-6qfc-rv55, MINI-3g2p-99xg-v49x, MINI-3jvm-7rh5-h99c, MINI-3q9j-hfr3-xj85, MINI-47f6-gwq4-frmx, MINI-4pqh-26qj-x2x4, MINI-4rc2-rw98-g7g7, MINI-4xm6-82wp-xrfm, MINI-5223-fhg3-29q3, MINI-54c5-jgxw-wgv4, MINI-556w-fwqq-24f9, MINI-55j5-pvc3-hfmw, MINI-56j6-439x-j2g7, MINI-57g9-gchg-5jcc, MINI-57q8-g4vv-7wxr, MINI-5cr7-8888-2v2f, MINI-5cxq-3669-w598, MINI-5g5j-prwm-gfcj, MINI-5hrq-mxj6-45pq, MINI-5jf7-vw4x-5x77, MINI-5p23-283j-v285, MINI-5pfc-3xvm-2xrc, MINI-5whr-6wf4-v4mp, MINI-5whx-h2rc-9pfr, MINI-64q2-x6p8-9588, MINI-66p3-r43x-35jx, MINI-6fgr-4qp8-6hf4, MINI-6fp2-56rg-2qj7, MINI-6jpm-q6fw-qmxc, MINI-6vm6-hvr8-rm6r, MINI-739v-mgww-9g8x, MINI-7539-9799-rhv7, MINI-75fv-63h2-hwxh, MINI-76ch-2w8c-xf2m, MINI-76xj-54qp-vj33, MINI-77mp-6gvw-vw9g, MINI-7c8x-gc3g-whpv, MINI-7ffv-qx98-ggpj, MINI-7hj8-299f-g6h6, MINI-82jj-v5xj-39q6, MINI-87gq-4wg4-v56w, MINI-892j-rh7g-9fcc, MINI-8c88-97g8-q8cq, MINI-8jmj-86gc-gv3v, MINI-8p2g-6x56-3rj6, MINI-8p2w-m2qm-6prw, MINI-8phx-qvpf-f84c, MINI-8w7p-cmh8-9hw2, MINI-9396-wxx2-jgvx, MINI-93h4-78g6-9pqx, MINI-9423-mv8m-8vpp, MINI-96mx-4g23-r972, MINI-9rff-xrxq-xgf5, MINI-9v3h-vpx2-5p5r, MINI-9v5g-qvrp-wjph, MINI-9w2r-2pm7-jvpv, MINI-9wf4-j2f5-8mr3, MINI-c64v-r5vm-vphp, MINI-c7v8-hhxv-8cmf, MINI-c8p3-rwr7-c2q7, MINI-c938-r492-g5g6, MINI-cc7c-m4rw-5v28, MINI-cfg9-m8q9-j7rq, MINI-cq3g-5g3m-3qg9, MINI-cqcg-3rf9-fcmj, MINI-cxq3-mmc2-xpxx, MINI-f69q-3v84-xq6h, MINI-f6xp-6pf4-h5cx, MINI-f758-v38q-qmm5, MINI-fcrm-635h-5m5x, MINI-fg9x-9gv4-r42r, MINI-fghq-cxwh-55f9, MINI-fm2r-mxhh-x63q, MINI-fq76-4wwp-vfrp, MINI-fqgg-x294-f74j, MINI-frxp-vv24-2m65, MINI-fv9r-39r3-vxxr, MINI-fw3g-387r-6824, MINI-g22j-3p83-hwrr, MINI-g5m6-gmf3-gw3v, MINI-g5q5-xpm6-vcq9, MINI-g983-w2jj-fc57, MINI-gc5c-v9mx-m5vm, MINI-gf4g-588f-5mfc, MINI-gj9r-4w9p-f368, MINI-gr5g-h3wx-ghfj, MINI-gv68-fccm-p2mc, MINI-gvxc-cm38-4mvv, MINI-h2mw-pv59-j438, MINI-h5vw-v7p4-54wj, MINI-hcfc-mg2q-p824, MINI-hg22-8cpv-jqx2, MINI-hq6r-w5w4-ggpq, MINI-hr5h-p6x7-rfrf, MINI-hvjp-x4m7-fgp3, MINI-hvvg-x9wc-9m3v, MINI-j2qm-92xv-w8j2, MINI-j438-gjcg-ppwr, MINI-jgmm-w4h8-4vwh, MINI-jhrc-7pmv-49c7, MINI-jjfx-92h9-qf7c, MINI-jjwp-j23c-rmjx, MINI-jwf3-vv6x-7cmx, MINI-jxv6-pmf7-v585, MINI-m3rp-mxc2-jx26, MINI-m888-mgrh-mg22, MINI-m92w-wf7w-6j9p, MINI-m9c7-w6cf-rrh4, MINI-mg8x-mv8v-j3jf, MINI-mh5w-rgcj-phjf, MINI-mhxm-j472-pqv5, MINI-mw7f-9q3m-j7px, MINI-p273-j587-99pq, MINI-p3fw-9w7v-cr2j, MINI-p5cv-vvp8-fjwg, MINI-p5mc-c37g-p2w7, MINI-p6pw-4fc8-m578, MINI-p948-p556-wjp4, MINI-p9cm-4r3j-wrm2, MINI-p9mx-j3qh-xqcp, MINI-pg44-9whw-389f, MINI-pgq6-q3j2-8r34, MINI-pq5c-584f-9c6r, MINI-prg8-vwwh-jph6, MINI-pw2f-2qc7-r8jw, MINI-px5x-pjg6-jv5q, MINI-q432-7qj8-cg3v, MINI-q84x-5mxh-3vj2, MINI-q8gm-j527-374c, MINI-q99w-f2pj-33j7, MINI-q9jg-hv24-g64v, MINI-qqc7-pj8x-fxqc, MINI-qvqf-8c7c-4vc4, MINI-qw33-jfhj-2jc4, MINI-r338-6478-3rm5, MINI-r35r-g33x-922p, MINI-rc8c-45vf-fh4q, MINI-rgpq-ccw3-wjh2, MINI-rgrm-ccm2-cv6q, MINI-rhm4-wmmm-8rg4, MINI-rq4q-vhg7-52cp, MINI-v3fg-gcm2-pc9r, MINI-v8m2-v5c3-3x6x, MINI-v97q-rfww-q5p9, MINI-vjwq-g67j-jjc2, MINI-vmq9-ccjf-wgx6, MINI-vrg4-rmrx-g9xc, MINI-vrx6-w88f-j45g, MINI-vxpx-wh88-7hpr, MINI-w6g2-jcmw-qqv3, MINI-w9j5-pm7f-48mq, MINI-wcw3-6jcw-44hv, MINI-wfr8-5jc3-q8v7, MINI-wjq8-f252-qf89, MINI-wmw5-6rvq-9p9j, MINI-wp36-55gq-8qv7, MINI-wpp8-wfg9-7fv4, MINI-x3xq-c5mw-7vpc, MINI-x57m-54r9-6465, MINI-x96c-f8wm-6hf3, MINI-xcvq-x57m-3fv6, MINI-xf63-5p4r-586p, MINI-xg98-mf38-369w, MINI-xgq3-qx6j-7w4w, MINI-xgwf-55c3-hp4h, MINI-xhf7-4vmg-hg5h, MINI-xm34-5hp2-5f37, MINI-xm9x-vgp6-8987, MINI-xmh2-jx58-h33q, MINI-xp2c-hhp4-rv7c, MINI-xw8w-j227-mv79, ROOT-APP-GOBINARY-CVE-2026-45570, UBUNTU-CVE-2026-45570

## What is CVE-2026-45570?

CVE-2026-45570 is a low-severity command injection vulnerability in go-git, published on 27 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-116 (Improper Encoding or Escaping of Output)

## Which versions are affected by CVE-2026-45570?

9 open source packages ship an affected version, including github.com/go-git/go-git, github.com/go-git/go-git/v5 and github.com/go-git/go-git/v6. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/go-git/go-git` | Go | All versions | None |
| `github.com/go-git/go-git` | Go | All versions to 4.7.0 | None |
| `github.com/go-git/go-git` | Go | All versions to 4.7.0 | None |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.19.1 |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.19.1 |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.19.1 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.4 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.4 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.4 |

Products: Go-Git Project Go-Git.

## How do I fix CVE-2026-45570?

Upgrade to a fixed version.

## Is CVE-2026-45570 being exploited?

There is no known exploitation of CVE-2026-45570 in the wild and no public exploit code.

## Other vulnerabilities in go-git

- [CVE-2023-49569](https://insights.sbomify.com/CVE-2023-49569/): Maliciously crafted Git server replies can lead to path traversal and RCE on go-git clients (critical 9.8)
- [CVE-2025-21613](https://insights.sbomify.com/CVE-2025-21613/): go-git has an Argument Injection via the URL field (critical 9.2)
- [CVE-2025-21614](https://insights.sbomify.com/CVE-2025-21614/): go-git clients vulnerable to DoS via maliciously crafted Git server replies (high 7.5)
- [CVE-2023-49568](https://insights.sbomify.com/CVE-2023-49568/): Maliciously crafted Git server replies can cause DoS on go-git clients (high 7.5)
- [CVE-2026-45022](https://insights.sbomify.com/CVE-2026-45022/): go-git: Improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git (high 7.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45570 and fix it if it is affected.

What it is: CVE-2026-45570 is a low-severity command injection vulnerability in go-git, published on 27 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-45570 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/go-git/go-git (Go): affected all versions; no fix listed
- github.com/go-git/go-git (Go): affected all versions up to 4.7.0; no fix listed
- github.com/go-git/go-git (Go): affected all versions up to 4.7.0; no fix listed
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.19.1
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.19.1
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.19.1
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.4
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.4
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-45570/ (Markdown: https://insights.sbomify.com/CVE-2026-45570/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-45570
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-45570
- OSV: https://osv.dev/vulnerability/CVE-2026-45570

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-45570/
Summaries are generated and may contain mistakes; the official description above is the record.
