Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104843 Overview
CVE-2026-104843 is a path traversal vulnerability [CWE-22] in uv, a Python package and project manager written in Rust and maintained by Astral. The flaw affects versions 0.12.7 through 0.12.17 on Windows hosts. During wheel extraction, uv can process a malicious wheel in a way that writes files outside the installation prefix. An attacker can place an executable in a directory already present on the user's PATH, enabling binary planting. Non-Windows hosts are not affected. The issue is fixed in 0.12.18.
Critical Impact
A malicious wheel installed with uv on Windows can drop an attacker-controlled executable into a PATH directory, leading to arbitrary command execution the next time that binary name is invoked.
Affected Products
- Astral uv versions 0.12.7 through 0.12.17 on Windows
- Python environments provisioned by uv wheel extraction on Windows
- CI/CD pipelines and developer workstations using uv for dependency installation on Windows
Discovery Timeline
- 2026-10-02 - CVE-2026-104843 published to NVD
- 2026-10-02 - Last updated in NVD database
- Fix released - Astral published uv0.12.18 containing the patch commit 6716964
Technical Details for CVE-2026-104843
Vulnerability Analysis
The vulnerability resides in uv's wheel extraction logic in crates/uv-extract/src/archive_path.rs. When uv normalizes archive entry paths, it rebuilds the path from its components. On Windows, a crafted entry name such as C:module.py can be interpreted during reconstruction as a path containing a Windows drive prefix (Component::Prefix) rather than a normal file name component. The reconstructed path becomes absolute, bypassing the intended installation prefix.
As a result, a malicious wheel can write files to any location the uv process can reach, including directories already on the user's PATH. Dropping an executable there yields binary planting: the next shell invocation of that command name executes the attacker's payload. Exploitation requires the victim to install an attacker-controlled wheel, which aligns with the user-interaction requirement in the CVSS vector.
Root Cause
The root cause is unsafe path reconstruction during archive extraction. The sanitizer walked components to strip .. and . segments but did not validate that the reassembled path was still relative. On Windows, individual components may be reinterpreted as drive prefixes or root directories, producing an absolute path that escapes the extraction root [CWE-22].
Attack Vector
An attacker publishes or substitutes a wheel containing archive entries whose names, when parsed by Windows path logic, resolve to a Component::Prefix or Component::RootDir. When a Windows user runs uv to install the wheel, extraction writes the embedded file to an absolute location such as a directory on PATH. Subsequent invocation of the planted binary name executes attacker code with the user's privileges.
Component::CurDir => (),
}
}
+
+ // Rebuilding can turn a normal component like `C:module.py` into a Windows prefix.
+ if let Some(Component::Prefix(_) | Component::RootDir) = path.components().next() {
+ return Ok(None);
+ }
+
Ok(Some(Self(path)))
}
Source: GitHub commit 6716964. The patch rejects any reconstructed path whose first component is a Windows drive prefix or root directory, forcing the extractor to treat such entries as invalid.
Detection Methods for CVE-2026-104843
Indicators of Compromise
- Unexpected executables (.exe, .bat, .cmd, .ps1) appearing in directories on the user PATH shortly after a uv pip install or uv add operation on Windows.
- Wheel archives containing entry names beginning with a drive letter and colon, such as C:..., or with backslash-separated absolute paths.
- File writes by uv.exe to locations outside the target virtual environment or project directory.
Detection Strategies
- Audit wheel contents before installation using python -m zipfile -l <wheel> and flag any entry whose name contains :, leading backslashes, or path traversal sequences.
- Monitor process telemetry for uv.exe writing files to directories outside the active virtual environment, especially user-writable PATH directories like %LOCALAPPDATA%\Microsoft\WindowsApps or %USERPROFILE%\AppData\Local\Programs.
- Compare installed uv versions across developer workstations and CI runners against the fixed version 0.12.18.
Monitoring Recommendations
- Alert on new executables created in user PATH directories by package manager processes.
- Log and review uv invocations in CI pipelines, including wheel sources and resolved indexes, to detect unexpected package origins.
- Track outbound requests from build agents to non-approved Python package indexes that may serve malicious wheels.
How to Mitigate CVE-2026-104843
Immediate Actions Required
- Upgrade uv to version 0.12.18 or later on all Windows developer workstations, build servers, and container images.
- Inventory wheels installed by vulnerable uv versions on Windows since 0.12.7 and verify no unexpected files were written outside project or environment directories.
- Restrict installation to trusted indexes and pin wheel hashes where possible to reduce exposure to malicious wheels.
Patch Information
The fix is included in uv0.12.18, released by Astral. The patch in commit 6716964 rejects reconstructed paths that begin with a Windows drive prefix or root directory during wheel extraction. See the GitHub Security Advisory GHSA-2cv4-cqwr-gwf7, Pull Request #21923, and the uv 0.12.18 release notes.
Workarounds
- Use uv only on non-Windows hosts until the upgrade is deployed, since Linux and macOS are not affected.
- Install only from vetted package indexes and require hash-pinned lockfiles to block substitution of malicious wheels.
- Run uv under a least-privileged Windows account so planted binaries cannot reach system-wide PATH directories.
# Upgrade uv on Windows to the patched release
uv self update
uv --version # expect 0.12.18 or later
# Or pin uv in CI
pip install "uv>=0.12.18"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

