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·80 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

•about 21 hours ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
5 views•10 min read
•about 22 hours ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
10 views•12 min read
•about 23 hours ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•1 day ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
10 views•10 min read
•1 day ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
13 views•10 min read
•1 day ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
6 views•9 min read