# CVE-2026-71557: go-git: Malicious reference names may modify files outside the reference storage

> Attackers can use malicious reference names to write files outside the intended directory in the go-git library.

- **Severity:** Medium 6.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 7 Aug 2026
- **Updated:** 7 Aug 2026
- **Also known as:** AZL-94673, AZL-95487, CLEANSTART-2026-ME34886, CLEANSTART-2026-MF55431, CLEANSTART-2026-TV37644, CLEANSTART-2026-UK97490, DEBIAN-CVE-2026-71557, ECHO-51cf-ad3b-4b6d, GHSA-qgq7-7hm3-q39j, GO-2026-6214, MINI-222g-p47v-736p, MINI-2275-p9cg-89m8, MINI-24fm-89pc-757p, MINI-2597-v2mp-2qxv, MINI-26gv-jpvh-g639, MINI-2f6f-37mq-pxqq, MINI-2gcg-j3rf-fpwf, MINI-2jrv-4fmf-ghp2, MINI-2m23-r8m5-9897, MINI-2pcj-3h2r-58r9, MINI-2qw5-vr2g-4q26, MINI-2qx5-wf78-hvx8, MINI-2v5r-2v6v-c4c3, MINI-347x-v75x-3mv7, MINI-35jc-6m9g-535w, MINI-36cj-jxfx-9fc2, MINI-36xm-28f3-87g5, MINI-37fh-fhxx-q94c, MINI-38fh-f6fr-cqg9, MINI-3c8j-32qh-mfw5, MINI-3fv5-r4w5-j43r, MINI-3fwg-p9r2-mc94, MINI-3gp9-x2h4-3gqp, MINI-3gqj-7x5v-vg35, MINI-3gr8-x397-7f3p, MINI-3hq7-m7rm-4cg9, MINI-3jm7-qqhf-66fj, MINI-3r59-gw87-9m2g, MINI-3rcp-jrhx-79rr, MINI-3rwq-fg5w-8hm9, MINI-3w3q-hjj4-xgc3, MINI-3w5w-qfch-44gx, MINI-3w6f-7c2j-hvjq, MINI-42jr-c95w-hqhq, MINI-43xr-r4w9-795g, MINI-44pp-cf5v-v2p6, MINI-453v-xm35-wjv4, MINI-46w6-7r9r-cvfx, MINI-48fc-cgf9-5hmq, MINI-4982-mmgx-gqxg, MINI-4hfp-94hx-ffjx, MINI-4pvx-86r7-8724, MINI-4rvg-c948-h4qq, MINI-4x5c-8r3g-r428, MINI-534f-p83j-2m89, MINI-553x-7vq9-222v, MINI-5659-42v2-7f5g, MINI-56hp-wfc6-hfh3, MINI-5894-w8r8-95qf, MINI-5956-h46j-8x7w, MINI-5g5m-pv6w-6xhr, MINI-5jvh-w2q2-55g9, MINI-5p4p-865c-m7gg, MINI-5x9h-f29w-wvg6, MINI-5xrm-vh93-5hm5, MINI-62mf-v5fh-wv55, MINI-64wc-c7c3-9888, MINI-66cw-v8jx-92r2, MINI-66g3-r83w-x7cm, MINI-6958-69j4-jxjg, MINI-6g99-45m4-289f, MINI-6hw7-mgqc-v926, MINI-6rph-9jwx-x823, MINI-6x8x-w8hg-vcm3, MINI-6xh7-24mv-wp8v, MINI-722m-65fp-v823, MINI-72v4-vfr4-wr29, MINI-73wp-3956-q8wv, MINI-79w2-q23v-6j6g, MINI-7f8w-69ww-r7cf, MINI-7g5c-p2jv-c358, MINI-7g62-vg9h-x5wf, MINI-7h9q-vcww-5p2m, MINI-7m33-c692-6mh2, MINI-82rp-92cv-2h5v, MINI-879h-jqmr-hq3v, MINI-8ch7-6gf5-g54p, MINI-8gww-wrpc-gwv5, MINI-8jpr-xgxv-hvx9, MINI-8m44-v7fg-2r2w, MINI-8mgp-m328-6vmm, MINI-8ppw-c672-3h88, MINI-8pr2-cj32-f64h, MINI-8wxh-rq93-83qv, MINI-8x6j-w22g-89cr, MINI-92wf-wrch-6c5x, MINI-9459-3cjr-gxgm, MINI-96rr-hj5w-rjw5, MINI-9877-gc24-42q2, MINI-9f73-c3wp-9xj8, MINI-9frx-53c8-m7v7, MINI-9gcg-2hpf-wjx3, MINI-9grp-q995-8h59, MINI-9jcw-hccw-gjhp, MINI-9jg5-8922-q65w, MINI-9jmg-855c-976r, MINI-9mf3-x9rp-337g, MINI-9qfc-26q3-2945, MINI-c2f8-qw6c-fjg9, MINI-c6rj-vvfv-qcm3, MINI-c7w9-c4ff-cxc6, MINI-ch68-2wr8-8rwq, MINI-cm9q-cx9w-xfrr, MINI-cmh4-qgx4-j4w6, MINI-cpg9-m2w9-f7f5, MINI-cpv3-frpw-x3j8, MINI-crv4-8v97-2c5q, MINI-cwhw-4xwp-76wv, MINI-f26g-p4qj-ww98, MINI-f2cv-xh8q-5w88, MINI-f4qg-6wq5-pm6h, MINI-f5v6-7743-2mhm, MINI-fcq3-fr9m-w7px, MINI-fcv5-m2wm-rmp7, MINI-ff3m-g88j-gm7f, MINI-ffvm-mc2g-m748, MINI-fg8x-m5x2-6rhh, MINI-fghf-3635-xp9p, MINI-fhq5-4qv2-j9r5, MINI-fhw2-j3m2-wf8j, MINI-fjhr-cjmc-mphq, MINI-fmq7-2w6v-25p4, MINI-fr7v-fwhc-3mv6, MINI-fv3x-4hjc-vfxx, MINI-fvmf-q6cq-qfvv, MINI-g3cp-wqhf-99wr, MINI-g5c8-3x7v-pw4x, MINI-g8cq-qhq2-xf59, MINI-ghcc-hgjq-vqpr, MINI-ghrq-qvq2-mch8, MINI-grjg-gw5f-j5hp, MINI-gvx9-j3px-j59j, MINI-gxv8-hwg6-rw6x, MINI-gxwg-7p4f-c6v7, MINI-h2m3-gjp3-cwhg, MINI-h49g-8ppr-x4wv, MINI-h4hx-wxqq-gc9m, MINI-h6ph-c4rm-4h6x, MINI-h6w4-283r-6963, MINI-h77f-45f7-4q84, MINI-hc29-9x58-7338, MINI-hc9v-hqhh-84gr, MINI-hcc4-qw56-mfw6, MINI-hfpq-8rq6-pwfr, MINI-hg89-8g2q-jwg4, MINI-hgh2-hp22-4qrx, MINI-hhr5-8p87-fw3f, MINI-hmx5-2qvm-jp45, MINI-hwrc-ph35-f4h6, MINI-hwv2-q5jf-rg6p, MINI-j2qf-jqp2-3g82, MINI-j39h-v576-p4rg, MINI-j94x-5cf7-79f2, MINI-j9pc-q3hm-fgvj, MINI-jfq9-57hv-v7gf, MINI-jh5h-f4g8-6rq4, MINI-jh76-3w7r-7mjw, MINI-jhwc-p2vp-47g2, MINI-jj7v-q5wr-pf7j, MINI-jpmq-mf24-fqf8, MINI-jwvx-3m83-2qh6, MINI-m52p-xj43-2mg4, MINI-m5c9-jv9w-wwxv, MINI-m6wg-r837-g5gq, MINI-m86g-56w6-ph58, MINI-m8xg-hwfm-r896, MINI-mc8f-gfmx-xmjc, MINI-mfwv-wm3q-qj26, MINI-mhfx-p376-9xr3, MINI-mq62-64wm-9wrx, MINI-mq7v-jf53-7rfc, MINI-mw4v-cgrx-r3vq, MINI-mx63-6pmj-qp29, MINI-p38f-vcm7-8892, MINI-p58m-88c2-p3p6, MINI-p5rh-34x4-mj76, MINI-p6p5-q2qq-3243, MINI-p6wf-9c58-7x8g, MINI-p93m-v4gv-g6w7, MINI-p9gg-5pvx-wcr7, MINI-pc7c-c7jj-q9vr, MINI-pcqm-8w2j-mqjm, MINI-pfmh-qhqg-g6cw, MINI-ph9h-74fc-pgp2, MINI-pj3x-f9f2-8qrp, MINI-pqp8-mrw5-729r, MINI-prc9-h3f8-pmhf, MINI-prmq-fghf-69fm, MINI-q24f-rrf6-qhqg, MINI-q337-h6xg-3qxg, MINI-q4q8-37mw-322q, MINI-q68g-wf69-hvx3, MINI-q6fh-j9qw-7v8r, MINI-q7pc-mhq3-f5h5, MINI-qcch-7jhp-m852, MINI-qchj-7m82-654v, MINI-qgg2-55g9-pwp6, MINI-qx9g-63rc-pwp8, MINI-qxjm-23qg-gwxw, MINI-qxmm-355w-28qw, MINI-qxr8-cwcf-j5hx, MINI-r2x7-vwq8-c34c, MINI-r326-gmh3-39jq, MINI-r336-xmgm-hf6x, MINI-r38c-gwrp-v8xh, MINI-r5p8-p225-2g39, MINI-r7hg-cm2j-hj3x, MINI-rc5c-gcgv-px2p, MINI-rfcv-78p7-6hrv, MINI-rfr7-fr5r-c7pf, MINI-rjqq-4fhj-94m8, MINI-rjqx-cmmv-h9cx, MINI-rr8f-8f3w-cgp3, MINI-rxrw-hcwx-cmjp, MINI-v3hg-hv5g-fjvq, MINI-v5h6-wvf6-vh7x, MINI-vgqj-7mpp-7w7v, MINI-vh85-j77c-5wpv, MINI-vh8v-43wx-9h4h, MINI-vhp5-37q7-4fx7, MINI-vr5c-3xcf-48gh, MINI-vx42-7h26-2m2f, MINI-w3hp-p3vw-9g4m, MINI-w8vx-vhmq-645v, MINI-w8wr-54vj-v8hm, MINI-w98p-j923-45rf, MINI-w9mw-hw82-w448, MINI-wfrc-fjwf-4x7v, MINI-wj58-5q3h-mh36, MINI-wpv6-fj9f-f5cm, MINI-wqff-cg6x-97xw, MINI-wrq9-2768-688j, MINI-wrqc-f5jf-32hr, MINI-wrrq-pxp9-pm7p, MINI-wvpv-q8hm-rh65, MINI-ww6h-9w72-vq5h, MINI-x26h-xqw9-5vpv, MINI-x6xg-96wg-hwq6, MINI-x9vg-8fh2-mj92, MINI-xcp6-pmc2-75gm, MINI-xfh9-3fm4-r7hc, MINI-xgx6-m2c8-cp3p, MINI-xh7c-3gvv-q6xf, MINI-xv5h-62pj-w75v, UBUNTU-CVE-2026-71557

## What is CVE-2026-71557?

CVE-2026-71557 is a medium-severity path traversal vulnerability in go-git, published on 7 Aug 2026. Any signed-in user can exploit it over the network, 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.2 and 6.0.0-alpha.5, reference names are not sanitized before being used to construct on-disk paths under the reference storage directory, so a maliciously crafted reference name (for example containing directory-traversal sequences) can cause go-git to write files outside the intended reference storage directory. Versions 5.19.2 and 6.0.0-alpha.5 fix the issue.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

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

6 open source packages ship an affected version, including github.com/go-git/go-git/v5 and github.com/go-git/go-git/v6.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.19.2 |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.19.2 |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.19.2 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.5 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.5 |
| `github.com/go-git/go-git/v6` | Go | All versions | 6.0.0-alpha.5 |

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

Upgrade github.com/go-git/go-git/v5 to 5.19.2 or later.

## Is CVE-2026-71557 being exploited?

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

Public exploit code:

- https://github.com/Saku0512/CVE-2026-71557-poc (github_poc): https://github.com/Saku0512/CVE-2026-71557-poc
- Reviewed isolated comparison lab for CVE-2026-71557 (github_poc): https://github.com/Saku0512/reprokit-go-git-cve-2026-71557-lab

## Fix prompt for AI coding agents

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

What it is: CVE-2026-71557 is a medium-severity path traversal vulnerability in go-git, published on 7 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-71557 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.19.2
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.19.2
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.19.2
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.5
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.5
- github.com/go-git/go-git/v6 (Go): affected all versions; fixed in 6.0.0-alpha.5

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-71557/ (Markdown: https://insights.sbomify.com/CVE-2026-71557/index.md)
```

## Sources

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

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