REDHAT-BUG-2512562: High severity go-git go-git vulnerability
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go-gitto a version that resolves this vulnerability.Fixed in 5.19.2 - Upgrade
Upgrade
go-gitto a version that resolves this vulnerability.Fixed in 6.0.0-alpha.5
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications that use go-git worktree operations, including checkout, status, or add, on a cloned maliciously crafted repository are exposed. The issue concerns symlinks within the repository working tree.
What does an attacker need to exploit it?
An attacker needs to provide a repository containing a crafted symbolic link and have the target clone that repository and perform affected worktree operations. The symlink can then cause file reads or writes outside the intended working directory.
Which versions address the issue?
The issue is addressed in go-git 5.19.2 and 6.0.0-alpha.5.