Privilege escalation in CPython on Windows via VPATH-based sys.path landmark detection
CVE-2026-12003 is a CPython vulnerability affecting Windows installations in which release builds retain in-tree source-layout detection logic intended for development builds. CPython defines the VPATH variable at build time and uses it to locate landmarks such as Modules/setup.local. If that landmark is found relative to VPATH and the executable, Python assumes it is running from a source tree and generates an alternate default sys.path. On Windows, builds under PCbuild/<arch> set VPATH to ..\.., causing the fallback landmark path to resolve to ..\..\Modules\setup.local, which can be outside the Python installation directory. In certain legacy all-users installations created by the superseded EXE installer, the directory two levels above the install path may be writable by low-privilege users. An attacker can create the expected Modules/setup.local landmark and a malicious alternative Lib directory at that external location, causing the interpreter to discover and use attacker-controlled libraries. The vulnerable behavior is part of a compatibility fallback used when .\pybuilddir.txt is absent.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
No public exploits tracked yet. Mallory keeps watching.
No public exploit code observed for this vulnerability.
Recent activity
9 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.