Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 79%

V5: go-git: Worktree operations may follow symlinks (CVE-2026-71556)

0
High
Published: 08/07/2026 (08/07/2026, 16:38:15 UTC)
Source: GCVE Database
Product: github.com/go-git/go-git/v5

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

Affected software

Goghsa
github.com/go-git/go-git/v5
Affected versions
<5.19.2
Goghsa
github.com/go-git/go-git/v6
Affected versions
<6.0.0-alpha.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/08/2026, 15:40:17 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses