Description
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.
Published: 2026-08-07
Score: 7.1 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability in the go-git library allows worktree operations such as checkout, status, and add to resolve symbolic links that point outside the intended working directory. The flaw is a classic path traversal (CWE‑59) that can result in arbitrary reading or writing of files beyond the repository root, potentially exposing sensitive data or enabling modification of system files by an attacker who controls the repository. The impact is therefore a compromise of confidentiality and integrity for any process that uses the vulnerable library.

Affected Systems

The issue affects the go‑git library before release version 5.19.2 and before the 6.0.0‑alpha.5 milestone. Any application or service that incorporates these earlier versions and performs worktree operations on a repository that contains malicious symlinks is vulnerable. Updating to 5.19.2 or later, or to 6.0.0‑alpha.5 or later, removes the flaw.

Risk and Exploitability

The CVSS score is 7.1, indicating a high severity. EPSS is not available, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is inferred from the fact that the vulnerability is triggered when the library processes a repository containing a symlink; an attacker must supply a crafted repository to the application. Once the library is invoked on a malicious repository, the symlink resolution bypass can lead to reading or writing any file the process can access. The mitigation is to patch the library.

Generated by OpenCVE AI on August 7, 2026 at 17:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update go‑git to version 5.19.2 or newer, or to 6.0.0‑alpha.5 or newer, to eliminate the symlink resolution bug.
  • Review and restrict repositories that your application accepts; ensure that only trusted code repositories are processed, or perform additional validation to detect suspicious symlinks.
  • Apply general security practices for third‑party libraries: keep dependencies up to date, monitor advisories, and if possible, isolate legacy code paths that may still use older versions.

Generated by OpenCVE AI on August 7, 2026 at 17:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hc8v-wwc9-vgxm go-git: Worktree operations may follow symlinks
History

Fri, 07 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Go-git
Go-git go-git
Vendors & Products Go-git
Go-git go-git

Fri, 07 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 07 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
Description 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.
Title go-git: Worktree operations may follow symlinks
Weaknesses CWE-59
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T16:58:19.113Z

Reserved: 2026-08-06T21:24:15.376Z

Link: CVE-2026-71556

cve-icon Vulnrichment

Updated: 2026-08-07T16:58:13.955Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T18:45:02Z

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')