CVE-2026-82248 in gitoxide
Summary
by MITRE • 08/28/2026
gix-worktree-state before 0.33.0 (part of gitoxide) allows writing files outside the worktree on Windows. gix_worktree_state::checkout() follows an existing terminal symlink during non-exclusive (incremental) materialization (destination_is_initially_empty: false) when core.symlinks is true. If a symlink entry (mode 120000) is first checked out at a path P pointing outside the worktree, a subsequent incremental checkout of a regular-file entry (mode 100644) at the same path follows the existing reparse point and writes the blob content through the link, overwriting files outside the worktree.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 08/28/2026
The vulnerability identified in gix-worktree-state prior to version 0.33.0 represents a critical file system manipulation flaw within the gitoxide library, specifically affecting Windows environments where symbolic links and reparse points are handled with distinct semantics compared to Unix-like systems. This issue arises during the checkout process when the configuration option core.symlinks is enabled, which instructs Git to create actual symbolic links rather than storing them as text files containing link targets. The flaw manifests during non-exclusive or incremental materialization operations where the destination directory already contains content, indicated by the parameter destination_is_initially_empty being false. In this specific scenario, if a previous checkout operation created a symlink at a path P that points to a location outside the current worktree, subsequent attempts to check out regular files at that same path can exploit the existing reparse point structure.
Technically, when gix_worktree_state::checkout encounters an entry for a regular file mode 100644 at a path where a symlink pointing externally already exists, it does not validate or resolve the target of the symlink before proceeding with the write operation. Instead, it follows the existing terminal symlink as if it were a standard directory or file placeholder within the worktree boundary. This behavior allows an attacker who controls the repository content to craft a sequence of commits where one commit introduces a symbolic link pointing outside the working directory, and a subsequent incremental checkout attempts to place a regular file at that same path. The library blindly writes the blob content through the symlink junction, effectively bypassing the worktree isolation mechanisms designed to prevent modifications beyond the intended project scope.
The operational impact of this vulnerability is severe, as it enables arbitrary file write operations on the host system outside the confines of the git repository. An attacker could leverage this flaw to overwrite critical configuration files, inject malicious code into executable binaries located in other directories, or corrupt data stored in sensitive locations such as user profile folders or system directories, provided they have sufficient permissions and can persuade a victim to perform an incremental checkout on a crafted repository. This constitutes a significant security risk because it undermines the fundamental assumption that operations within a git worktree remain contained within that directory structure. The ability to write arbitrary data outside the worktree can lead to privilege escalation if executed with elevated privileges, or more commonly, results in local denial of service and potential remote code execution depending on which files are targeted by the malicious symlink chain.
This vulnerability aligns closely with CWE-22, specifically Improper Limitation of a Pathname to a Restricted Directory, as it fails to restrict file operations to the intended directory scope due to improper handling of symbolic link resolution. Furthermore, from an adversary perspective, this technique is consistent with ATT&CK tactic T1048, which covers Exfiltration Over Alternative Protocol or more broadly relates to storage manipulation techniques where attackers modify files outside expected locations to evade detection or establish persistence. The lack of validation for symlink targets during incremental checkouts creates a path traversal-like effect that exploits the underlying operating system's file handling logic rather than a direct buffer overflow or injection flaw.
To mitigate this vulnerability, users must upgrade gix-worktree-state and related gitoxide components to version 0.33.0 or later, where the checkout logic has been hardened to detect existing symlinks pointing outside the worktree and either reject such operations or resolve them safely without following external links blindly. Administrators should also consider disabling core.symlinks in environments where untrusted repositories are frequently checked out, thereby forcing Git to store symlink targets as plain text files rather than creating actual system-level symbolic links that can be exploited for path traversal. Additionally, implementing strict file integrity monitoring on critical directories outside the worktree can help detect unauthorized modifications resulting from such exploits before they cause significant damage.