Wheel Affected by Arbitrary File Permission Modification via Path Traversal in wheel unpack
CVE-2026-24049 · GHSA-8rrh-rw8j-w5fx
- Affected
- PyPI wheel >= 0.40.0, <= 0.46.1
- Fixed in
- 0.46.2· Vendor fix available
- Issue
- - Vulnerability Type: Path Traversal (CWE-22) leading to Arbitrary File Permission Modification. - Root Cause Component: wheel.cli.unpack.unpack function. - Affected Packages: 1. wheel (Upstream source) 2. setuptools (Downstream, vendors wheel) - Severity: High (Allows modifying system file permissions). Details The vulnerability exists in how the unpack function handles file permissions after extraction. The code blindly trusts the filename from the archive header for the chmod operation, even though the extraction process itself might have sanitized the path. PoC I have confirmed this exploit works against the unpack function imported from setuptools.vendor.wheel.cli.unpack. Prerequisites: pip install setuptools Step 1: Generate the Malicious Wheel (genpoc.py) This script creates a wheel that passes internal hash validation but contains a directory traversal payload in the file list. Step 2: Run the Exploit (exploit.py) result: <img width="806" height="838" alt="image"…
Recommended action: Upgrade to 0.46.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.