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

Advisory record · `GHSA-qgq7-7hm3-q39j`

- **Identifiers:** `GHSA-qgq7-7hm3-q39j` · `CVE-2026-71557` · `GO-2026-6214`
- **State:** Confirmed
- **Severity:** CVSS 6.3 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-22](https://cwe.mitre.org/data/definitions/22.html)
- **Tags:** [Path traversal](https://agentprime.io/advisories/tag/path-traversal.md)
- **Published:** 7 Aug 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 7 Aug 2026, 16:41 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `github.com/go-git/go-git/v5` (Go): affected `<5.19.2`; fixed in `5.19.2`
- `github.com/go-git/go-git/v6` (Go): affected `<6.0.0-alpha.5`; fixed in `6.0.0-alpha.5`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Go-git versions before 5.19.2 (v5) and before 6.0.0-alpha.5 (v6) are vulnerable to a path traversal issue in filesystem-backed reference storage. An attacker who can get a malicious Git server to advertise a crafted reference name, or otherwise supply such names, can make the library access files outside the intended reference storage, such as repository config or HEAD. Upgrade to go-git v5.19.2 or v6.0.0-alpha.5. Applications using only in-memory storage are not affected.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 6.3 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0041, the 36th percentile, on 14 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:14 UTC: First seen by agentprime
- 31 Oct 2026, 14:14 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-qgq7-7hm3-q39j)

## Sources

- [GitHub Advisory Database: GHSA-qgq7-7hm3-q39j](https://github.com/advisories/GHSA-qgq7-7hm3-q39j)
- [OSV: GHSA-qgq7-7hm3-q39j](https://osv.dev/vulnerability/GHSA-qgq7-7hm3-q39j)
- <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>
- <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>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-qgq7-7hm3-q39j>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-qgq7-7hm3-q39j/>. Everything for agents: <https://agentprime.io/llms.txt>.
