Executive brief
The 'wheel' library, a standard tool for installing Python packages, contains a security flaw in how it handles file extractions. An attacker can create a specially crafted package file that, when opened by a user, changes the permissions of sensitive files elsewhere on the computer (such as system configuration or security keys). This could allow an attacker to gain administrative control over the system or modify critical data.
Technical details
A path traversal vulnerability exists in the 'wheel.cli.unpack.unpack' function. While the extraction process itself (via zipfile) is sanitized, the subsequent 'chmod' operation blindly trusts the unsanitized filename from the archive header (zinfo.filename). By crafting a wheel file containing entries with '../' sequences and specific external attributes, an attacker can trigger a chmod operation on files outside the intended destination directory. This can be used to make sensitive files like /etc/passwd or SSH keys world-writable (0o777). The issue is also present in 'setuptools' due to its vendoring of the 'wheel' library. A fix is available in version 0.46.2 which uses the sanitized path returned by the extraction process for permission updates.
Affected products
- Python Packaging Authority (PyPA) wheel 0.40.0 through 0.46.1
- Python Packaging Authority (PyPA) setuptools Affected via vendored wheel library
Timeline
- 2026-01-21: patched: Version 0.46.2 released
- 2026-01-22: disclosed: Security advisory published
References
- https://github.com/pypa/wheel/commit/7a7d2de96b22a9adf9208afcc9547e1001569fef
- https://github.com/pypa/wheel/releases/tag/0.46.2
- https://github.com/pypa/wheel/security/advisories/GHSA-8rrh-rw8j-w5fx
- https://access.redhat.com/errata/RHSA-2026:10184
- https://access.redhat.com/errata/RHSA-2026:13545
- https://access.redhat.com/errata/RHSA-2026:14020
- https://access.redhat.com/errata/RHSA-2026:1504