REDHAT-BUG-2512562: High severity go-git go-git vulnerability

Published Aug 7, 2026
·
Updated

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

1 affected component
go-git go-git<5.19.2, <6.0.0-alpha.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go-git to a version that resolves this vulnerability.

    Fixed in 5.19.2
  2. Upgrade

    Upgrade go-git to a version that resolves this vulnerability.

    Fixed in 6.0.0-alpha.5

Event History

Aug 7, 2026
Data Sourced
via Red Hat·04:51 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

Which versions address the issue?

The issue is addressed in go-git 5.19.2 and 6.0.0-alpha.5.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203