CVE-2026-71556

CVE-2026-71556 is a high-severity security vulnerability in github.com/go-git/go-git/v5 (go), affecting versions <= 5.19.1. It is fixed in 5.19.2, 6.0.0-alpha.5.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

go-git: Worktree operations may follow symlinks

Credits

Thanks to @kodareef5 for reporting this issue and working with the go-git security team toward its resolution. :1st_place_medal:
We would also like to thank @HughLewis20, who independently reported the same issue while a fix was already in progress.

Impact

A symlink traversal issue in go-git could allow worktree operations to modify files outside the intended worktree path.

The worktreeFilesystem wrapper rejected dangerous path strings, including paths containing .git, parent-directory components, or control characters. However, it did not prevent filesystem operations from following symbolic links that were already present in the worktree.

As a result, a path that is safe when evaluated as a string could still resolve into the repository's Git metadata directory. For example, if s is a symbolic link to .git, writing to s/config would modify .git/config.

A symbolic link at the final path component could also be followed. For example, if s points directly to .git/config, opening s for writing with truncation could overwrite the repository configuration.

Exploitation requires an attacker to be able to introduce or control a symbolic link in the worktree and cause the application to perform a write through that path.

Applications using storage/memory for their Storer, or go-billy/memfs for their Worktree, are not affected by this vulnerability.

CVE-2026-71556 has a CVSS score of 7.1 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.19.2, 6.0.0-alpha.5); upgrading removes the vulnerable code path.

Affected versions

github.com/go-git/go-git/v5 (<= 5.19.1) github.com/go-git/go-git/v6 (<= 6.0.0-alpha.4)

Security releases

github.com/go-git/go-git/v5 → 5.19.2 (go) github.com/go-git/go-git/v6 → 6.0.0-alpha.5 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The issue has been addressed by making the worktree filesystem wrapper a symlink-safe boundary.

Worktree operations now reject paths where an existing symbolic link in any path component could cause the operation to escape the intended worktree location, including symbolic links at the final component.

Users of filesystem-backed worktrees should upgrade to a patched version.

Frequently Asked Questions

  1. What is CVE-2026-71556? CVE-2026-71556 is a high-severity security vulnerability in github.com/go-git/go-git/v5 (go), affecting versions <= 5.19.1. It is fixed in 5.19.2, 6.0.0-alpha.5.
  2. How severe is CVE-2026-71556? CVE-2026-71556 has a CVSS score of 7.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-71556?
    • github.com/go-git/go-git/v5 (go) (versions <= 5.19.1)
    • github.com/go-git/go-git/v6 (go) (versions <= 6.0.0-alpha.4)
  4. Is there a fix for CVE-2026-71556? Yes. CVE-2026-71556 is fixed in 5.19.2, 6.0.0-alpha.5. Upgrade to this version or later.
  5. Is CVE-2026-71556 exploitable, and should I be worried? Whether CVE-2026-71556 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-71556 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-71556?
    • Upgrade github.com/go-git/go-git/v5 to 5.19.2 or later
    • Upgrade github.com/go-git/go-git/v6 to 6.0.0-alpha.5 or later

Other vulnerabilities in github.com/go-git/go-git/v5

Stop the waste.
Protect your environment with Kodem.