Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

go-git: Worktree operations may follow symlinks

CVSS 3.1 7.1 HIGHEUVD CVSS 3.1 7.1 CVSS 3.1 · [email protected] · Secondary 7.1 HIGHCVSS_V3 Publisher rating HIGHFixed by github.com/go-git/go-git/v5 5.19.2Fixed by github.com/go-git/go-git/v6 6.0.0-alpha.5osv · severity unknownFixed by github.com/go-git/go-git/v5 5.19.2Fixed by github.com/go-git/go-git/v6 6.0.0-alpha.5KEV status unknown

cve-program · CVE-2026-71556

Published

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, worktree operations (including checkout, status, and add) resolve symbolic links inside the working tree without confining resolution to the worktree boundary, so a maliciously crafted repository containing a symlink can cause go-git to read from or write to files outside the intended working directory when the repository is cloned and its worktree operations are used. Versions 5.19.2 and 6.0.0-alpha.5.

Read the publisher's advisory

euvd · EUVD-2026-54526

Published

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, worktree operations (including checkout, status, and add) resolve symbolic links inside the working tree without confining resolution to the worktree boundary, so a maliciously crafted repository containing a symlink can cause go-git to read from or write to files outside the intended working directory when the repository is cloned and its worktree operations are used. Versions 5.19.2 and 6.0.0-alpha.5.

Read the publisher's advisory

nvd · CVE-2026-71556

Published

go-git is an extensible git implementation library written in pure Go. Prior to 5.19.2 and 6.0.0-alpha.5, worktree operations (including checkout, status, and add) resolve symbolic links inside the working tree without confining resolution to the worktree boundary, so a maliciously crafted repository containing a symlink can cause go-git to read from or write to files outside the intended working directory when the repository is cloned and its worktree operations are used. Versions 5.19.2 and 6.0.0-alpha.5.

Read the publisher's advisory

osv · GHSA-hc8v-wwc9-vgxm

Published

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

Read the publisher's advisory

osv · GO-2026-6213

Published

Worktree operations may follow symlinks in github.com/go-git/go-git

Read the publisher's advisory

Affected versions, risk and source history

Related advisories and sources

Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.

CVE-2026-71556 · CVE overview and exploitation status

EUVD-2026-54526

GHSA-hc8v-wwc9-vgxm

GO-2026-6213

cve-program · CVE-2026-71556

euvd · EUVD-2026-54526

nvd · CVE-2026-71556

osv · GHSA-hc8v-wwc9-vgxm

osv · GO-2026-6213

Related changes

Linked by CVE identifier
ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 22 Nov 11:16 UTC · 274 of 275 readable · 270 fully read · documentation 469/469 current