V5: go-git: Worktree operations may follow symlinks (CVE-2026-71556)
A symlink traversal vulnerability in go-git before version 5.19.2 and version 6.0.0-alpha.5 allows worktree operations to follow symbolic links, potentially modifying files outside the intended worktree path, including Git metadata files. This occurs because the worktreeFilesystem wrapper did not prevent following existing symlinks in the path, enabling writes to escape the repository boundary. Exploitation requires attacker control over symlinks in the worktree and triggering a write operation through them. The issue has been fixed by rejecting paths where symlinks could cause escape from the worktree. Users of filesystem-backed worktrees should upgrade to a patched version.
AI Analysis
Technical Summary
The vulnerability CVE-2026-71556 in github.com/go-git/go-git/v5 involves a symlink traversal issue in worktree operations. The worktreeFilesystem wrapper filtered dangerous path strings but did not prevent following existing symbolic links in the worktree path. This allowed an attacker who could introduce or control symlinks to cause writes to files outside the intended worktree, including the .git directory and its configuration files. For example, writing to a symlink pointing to .git/config could overwrite repository configuration. This affects filesystem-backed worktrees but not in-memory storage or memfs worktrees. The fix makes the worktree filesystem wrapper symlink-safe by rejecting any path where a symlink could cause escape from the worktree, including symlinks at the final path component.
Potential Impact
An attacker able to place or control symbolic links in the worktree and trigger write operations can modify files outside the intended repository path, including critical Git metadata files such as .git/config. This can lead to unauthorized modification of repository configuration or other files, potentially impacting repository integrity. The vulnerability does not affect in-memory or memfs-backed worktrees. There are no known exploits in the wild.
Mitigation Recommendations
A patch is available that makes the worktree filesystem wrapper symlink-safe by rejecting paths where symlinks could cause escape from the worktree location. Users of filesystem-backed worktrees should upgrade to a fixed version of go-git (versions >= 5.19.2 and excluding 6.0.0-alpha.5). No additional mitigation is required if using storage/memory or go-billy/memfs for worktrees.
V5: go-git: Worktree operations may follow symlinks (CVE-2026-71556)
Description
A symlink traversal vulnerability in go-git before version 5.19.2 and version 6.0.0-alpha.5 allows worktree operations to follow symbolic links, potentially modifying files outside the intended worktree path, including Git metadata files. This occurs because the worktreeFilesystem wrapper did not prevent following existing symlinks in the path, enabling writes to escape the repository boundary. Exploitation requires attacker control over symlinks in the worktree and triggering a write operation through them. The issue has been fixed by rejecting paths where symlinks could cause escape from the worktree. Users of filesystem-backed worktrees should upgrade to a patched version.
CVSS v3.1
Score 7.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-71556 in github.com/go-git/go-git/v5 involves a symlink traversal issue in worktree operations. The worktreeFilesystem wrapper filtered dangerous path strings but did not prevent following existing symbolic links in the worktree path. This allowed an attacker who could introduce or control symlinks to cause writes to files outside the intended worktree, including the .git directory and its configuration files. For example, writing to a symlink pointing to .git/config could overwrite repository configuration. This affects filesystem-backed worktrees but not in-memory storage or memfs worktrees. The fix makes the worktree filesystem wrapper symlink-safe by rejecting any path where a symlink could cause escape from the worktree, including symlinks at the final path component.
Potential Impact
An attacker able to place or control symbolic links in the worktree and trigger write operations can modify files outside the intended repository path, including critical Git metadata files such as .git/config. This can lead to unauthorized modification of repository configuration or other files, potentially impacting repository integrity. The vulnerability does not affect in-memory or memfs-backed worktrees. There are no known exploits in the wild.
Mitigation Recommendations
A patch is available that makes the worktree filesystem wrapper symlink-safe by rejecting paths where symlinks could cause escape from the worktree location. Users of filesystem-backed worktrees should upgrade to a fixed version of go-git (versions >= 5.19.2 and excluding 6.0.0-alpha.5). No additional mitigation is required if using storage/memory or go-billy/memfs for worktrees.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hc8v-wwc9-vgxm
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-71556"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a77432dbf8831d539b461ea
Added to database: 08/08/2026, 14:54:37 UTC
Last enriched: 08/08/2026, 15:40:17 UTC
Last updated: 08/09/2026, 00:49:41 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.