CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-71556

CVE-2026-71556: Symbolic Link Directory Traversal in go-git

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 8, 2026·5 min read·77 visits

Executive Summary (TL;DR)

A path traversal vulnerability in go-git allows malicious repositories to overwrite files outside the worktree via crafted symbolic links, potentially leading to remote code execution.

A symbolic link directory traversal vulnerability was identified in go-git, a pure Go implementation of the Git specification. This vulnerability allows an attacker to construct a repository that, when checked out or processed, bypasses directory boundaries to write or overwrite arbitrary files on the host filesystem.

Vulnerability Overview

An arbitrary file write vulnerability exists in the worktree implementation of go-git, a widely integrated pure Go implementation of the Git specification. The flaw arises during repository checkout operations when processing paths containing symbolic links that resolve outside the designated worktree directory.\n\nSecurity tools, integrated development environments (IDEs), and continuous integration (CI/CD) pipelines frequently rely on go-git to programmatically clone, fetch, and analyze untrusted remote repositories. This specific vulnerability exposes these automated systems and client environments to high-severity integrity risks.\n\nThe vulnerability, cataloged as CVE-2026-71556 and GHSA-hc8v-wwc9-vgxm, represents a failure to ensure that physical paths map strictly to the intended virtual boundary. An attacker who successfully influences a repository configuration can leverage this discrepancy to execute arbitrary file operations on the host system.

Root Cause Analysis

The root cause of this vulnerability lies in the divergence between lexical path validation and physical path resolution. The worktreeFilesystem component in go-git previously restricted operations to the worktree using a string-based validation function named validPath. This function analyzed path strings to detect parent directory segments, metadata directories, and alternative filesystem stream markers.\n\nWhile lexical path checking successfully identifies direct attempts to traverse boundaries, it does not account for the state of the physical filesystem. If a repository contains a symbolic link that points to a path outside the worktree, the operating system's file creation APIs resolve the link dynamically during write operations.\n\nWhen the checkout process creates a symbolic link followed by a file situated logically beneath that link, the lexical check evaluates the second file's path string as benign. The underlying filesystem driver subsequently resolves the previously created symbolic link, which permits the file write operation to escape the root boundary of the worktree.

Code Analysis

The vulnerability is resolved by introducing active path state validation and proactive cleanup of blocking symlinks prior to file creation. The implementation introduces clearBlockingSymlinks, which recursively verifies the target path from the shallowest directory component downward.\n\ngo\nfunc (w *Worktree) clearBlockingSymlinks(name string) error {\n\tvar dirs []string\n\tfor dir := filepath.Dir(name); dir != \".\" && dir != \"\" && dir != string(filepath.Separator); dir = filepath.Dir(dir) {\n\t\tdirs = append(dirs, dir)\n\t}\n\tfor i := len(dirs) - 1; i >= 0; i-- {\n\t\tfi, err := w.Filesystem.Lstat(dirs[i])\n\t\tif err != nil {\n\t\t\tif os.IsNotExist(err) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t\tif fi.Mode()&os.ModeSymlink != 0 {\n\t\t\treturn w.Filesystem.Remove(dirs[i])\n\t\t}\n\t}\n\tfi, err := w.Filesystem.Lstat(name)\n\t// ... remaining check for final component symlink\n}\n\n\nAdditionally, the worktreeFilesystem wrapper was hardened to perform on-disk validation via validNoLeadingSymlink for every read and write operation. This ensures that any path containing a leading component that physically exists on disk as a symbolic link is rejected before passing the path to the physical driver.

Exploitation Methodology

To execute this attack, an operator must craft a repository with specific directory structures. The repository must define a symbolic link entry whose target points outside the intended worktree directory, such as the localized .git metadata directory or system configuration folders.\n\nA second file entry is then added to the repository using a logical path nested within the symbolic link component. For example, if the symbolic link is named s and points to .git, the subsequent file is defined at s/config.\n\nWhen a vulnerable client performs a checkout, the application materializes the symbolic link s. When it proceeds to write s/config, the lexical parser permits the write, and the operating system follows the symbolic link to overwrite the repository's .git/config file.\n\nmermaid\ngraph LR\n A[\"Client Clones Malicious Repo\"] --> B[\"Checkout Writes Symlink 's'\"]\n B --> C[\"Checkout Processes Path 's/config'\"]\n C --> D[\"Lexical Check Approves 's/config'\"]\n D --> E[\"OS Resolves Symlink 's' to Target\"]\n E --> F[\"Attacker Payload Overwrites Target File\"]\n

Impact Assessment

The primary consequence of this vulnerability is unauthorized file modification and absolute file write capabilities within the security context of the user executing go-git. Because Git configurations control command execution parameters, this primitive easily leads to remote code execution.\n\nBy overwriting the repository's local .git/config file, an attacker can define malicious Git configurations such as custom core pagers, file system monitors, or post-checkout hooks. These configurations are executed automatically during subsequent Git operations performed by the host environment.\n\nThe vulnerability represents a CVSS score of 7.1, indicating high severity. The main limiting factor is the requirement of user interaction, as the victim must actively clone, pull, or checkout the malicious repository to trigger the exploit.

Remediation and Security Hardening

The definitive remediation for CVE-2026-71556 requires updating the go-git library to a patched version. Maintainers have released versions 5.19.2 and 6.0.0-alpha.5 to address the flaw across affected release branches.\n\nWhere immediate patching of the underlying library is impractical, operational mitigations should be applied. Deploying Go applications within ephemeral containerized environments ensures that out-of-bounds writes do not impact the underlying host filesystem or modify persistent configuration files.\n\nAdditionally, development teams can integrate static analysis tools such as govulncheck into build pipelines. This automated scanning flags instances of vulnerable go-git versions within the compiled binaries before deployment.

Fix Analysis (2)

Technical Appendix

CVSS Score
7.1/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L

Affected Systems

Applications using go-gitCI/CD pipelines relying on programmatic git cloningDeveloper tools using go-git integrations

Affected Versions Detail

Product
Affected Versions
Fixed Version
go-git
go-git
< 5.19.25.19.2
go-git
go-git
>= 6.0.0-alpha.1, < 6.0.0-alpha.56.0.0-alpha.5
AttributeDetail
CWE IDCWE-59
Attack VectorNetwork
CVSS Score7.1 (High)
Exploit StatusNone / Poc Conceptual
CISA KEV StatusNot Listed
Primary WeaknessImproper Link Resolution Before File Access

MITRE ATT&CK Mapping

T1204.001User Execution: Malicious Link
Execution
T1491Defacement
Impact
CWE-59
Improper Link Resolution Before File Access ('Link Following')

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

References & Sources

  • [1]GitHub Security Advisory GHSA-hc8v-wwc9-vgxm
  • [2]NVD - CVE-2026-71556

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•42 minutes ago•CVE-2026-120778
7.3

CVE-2026-120778: Local Elevation of Privilege via Insecure Temporary Directory Handling and MSBuild Response File Hijacking in Microsoft .NET Aspire CLI

A local elevation of privilege vulnerability exists in the Microsoft .NET Aspire CLI (`Aspire.Cli`) versions 13.5.4 prior to 13.6.5. When executing SDK management commands (`aspire sdk generate`, `aspire sdk dump`, and `aspire sdk export`), the CLI creates temporary project directories inside the shared operating system temporary folder (such as `/tmp` on Unix-like systems) without restricting directory permissions or disabling MSBuild automatic response file resolution. A local, low-privileged attacker on a multi-user system can place a crafted `Directory.Build.rsp` file in the shared temporary directory hierarchy. When a victim user executes an affected Aspire CLI command, MSBuild traverses upward, ingests the attacker-controlled response file, and executes arbitrary commands in the security context of the victim user.

Alon Barad
Alon Barad
1 views•10 min read
•about 2 hours ago•CVE-2026-120792
7.3

CVE-2026-120792: Local Information Disclosure via Temporary File Logging in Microsoft .NET Aspire CLI

CVE-2026-120792 is a high-severity local information disclosure vulnerability in the Microsoft .NET Aspire CLI (Aspire.Cli) affecting versions 13.5.4 prior to 13.6.5. The flaw stems from the insertion of sensitive information into a shared temporary log file (CWE-532) combined with insecure temporary file creation (CWE-377) within the DeprecatedMcpCommandScanner component. During agent configuration scanning, the CLI unconditionally appends internal workspace paths and the first 200 characters of Model Context Protocol (MCP) agent configuration files to a statically named file in the system temporary directory. On multi-user systems, unprivileged local users can read this file to harvest API keys, authentication tokens, and internal service endpoints.

Alon Barad
Alon Barad
3 views•9 min read
•about 3 hours ago•CVE-2026-114159
8.8

CVE-2026-114159: Heap-Based Buffer Overflow in Microsoft Visual Studio and .NET Native Symbol Reader

CVE-2026-114159 is a heap-based buffer overflow vulnerability (CWE-122) in Microsoft.DiaSymReader.Native affecting Microsoft Visual Studio and the .NET Runtime on Windows. An integer truncation error during the parsing of oversized document names in Portable PDB symbol files causes an undersized heap allocation, leading to an out-of-bounds memory write and remote code execution.

Alon Barad
Alon Barad
6 views•10 min read
•about 4 hours ago•CVE-2026-114158
8.8

CVE-2026-114158: Heap-Based Buffer Overflow in Microsoft.DiaSymReader.Native Portable PDB Parser

CVE-2026-114158 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported servicing branches of Microsoft .NET (.NET 8.0, 9.0, 10.0, and 11.0) on Windows. The flaw resides in the native symbol reader library, Microsoft.DiaSymReader.Native, and is triggered when parsing Portable Program Database (PDB) metadata containing malformed EmbeddedSource custom debug information records. By supplying a parent Record Identifier (RID) of zero or an out-of-bounds value, an attacker causes an integer underflow during 1-based to 0-based index conversion, leading to a heap-based buffer overflow and arbitrary code execution within the context of the host developer tool or runtime.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 5 hours ago•CVE-2026-114151
8.8

CVE-2026-114151: Remote Code Execution via Stack-Based Buffer Overflow in Microsoft Visual Studio and .NET Symbol Reader

CVE-2026-114151 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported versions of the Microsoft .NET runtime on Windows. The flaw resides in the native Debug Information Access (DIA) symbol reader component, Microsoft.DiaSymReader.Native. When parsing Program Database (.pdb) files, the component fails to validate the length of serialized numeric records (specifically LF_DECIMAL structures) before unpacking them into a fixed-size stack buffer. An attacker who convinces a user or automated diagnostic process to load a crafted .pdb file can trigger a stack-based buffer overflow, resulting in arbitrary code execution within the context of the host process.

Alon Barad
Alon Barad
5 views•9 min read
•about 6 hours ago•GHSA-6856-87HX-P5X7
7.5

CVE-2026-105544: Local Elevation of Privilege in .NET Test Platform CLI

CVE-2026-105544 is a high-severity local elevation of privilege vulnerability in Microsoft .NET and Microsoft.TestPlatform.CLI. Improper access control on local inter-process communication mechanisms and execution brokers allows an authorized local attacker to cross security boundaries and execute arbitrary code in the context of a higher-privileged user running a test execution cycle.

Amit Schendel
Amit Schendel
6 views•9 min read