Code execution via uuid.dll search-path hijacking
Published Jun 16, 2022 · Updated Apr 15, 2025
DLL hijacking in CPython 2.7.13 on Windows allows context-dependent attackers to execute code when a user launches pgAdmin4. Lib/uuid.py loads uuid.dll by bare filename through ctypes, allowing Windows to resolve an attacker-planted library from an untrusted search-path directory. Exploitation requires write access to a searched directory and user interaction to start pgAdmin4; the payload runs with that user's privileges.
Summary
What happened
DLL hijacking in CPython 2.7.13 on Windows allows context-dependent attackers to execute code when a user launches pgAdmin4. Lib/uuid.py loads uuid.dll by bare filename through ctypes, allowing Windows to resolve an attacker-planted library from an untrusted search-path directory. Exploitation requires write access to a searched directory and user interaction to start pgAdmin4; the payload runs with that user's privileges.
The record
- CVE
- CVE-2017-20052
- Published
- Jun 16, 2022
- Updated
- Apr 15, 2025
- Vendor
- Python Software Foundation
- Product
- CPython
- Classifications
- CWE-427, T1574.001
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jun 16, 2022CVE publishedPublication date reported by the CVE source.
- Apr 15, 2025Record 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=2.7.13
What conditions does exploitation require?
What is affected?
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
- Python 2.7.13 DLL 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