Local code execution via alias search-path hijacking
Published Apr 1, 2026 · Updated Apr 1, 2026
Search-path hijacking in Python Install Manager 26.0 allows local users to execute code through generated script aliases. The alias-generation logic in src/manage/aliasutils.py writes an empty string to sys.path[0], causing Python to resolve imports from the current working directory before the intended package. Execution requires a user to run an affected alias, such as pip or pytest, from an attacker-controlled directory, where a planted module runs with that user's privileges.
Summary
What happened
Search-path hijacking in Python Install Manager 26.0 allows local users to execute code through generated script aliases. The alias-generation logic in src/manage/aliasutils.py writes an empty string to sys.path[0], causing Python to resolve imports from the current working directory before the intended package. Execution requires a user to run an affected alias, such as pip or pytest, from an attacker-controlled directory, where a planted module runs with that user's privileges.
The record
- CVE
- CVE-2026-5271
- Published
- Apr 1, 2026
- Updated
- Apr 1, 2026
- Vendor
- Python Software Foundation
- Product
- Python Install Manager
- Classifications
- CWE-426, CWE-427, CAPEC-471, T1574.008
- Attack vector
- local
- Privileges
- Unavailable
Timeline
How it unfolded
- Apr 1, 2026CVE publishedPublication date reported by the CVE source.
- Apr 1, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=26.0 <26.1
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- GHSA-jr5x-hgm4-rrm6 module-hijacking proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo