cve.bz

CVE-2026-12003 python software foundation cpython: Uncontrolled Search Path Element

5.3 mediumEPSS 0.1%

Medium (5.3) in python software foundation cpython. EPSS 0.1% estimated probability of exploitation activity in the next 30 days.

On this page
To allow builds of Python to be run from an in-tree layout (rather than an installed file layout), the VPATH variable is defined at build time and used to locate certain landmarks - specifically, Modules/setup.local. When this landmark is found relative to VPATH relative to the executable, Python assumes it is running in a source tree and generates a different default sys.path. This code remains in release builds, so that release-ready builds can be built in-tree. On Windows, since builds are written to 'PCbuild/', the value of VPATH is set to '..\..', which results in a landmark of '..\..\Modules\setup.local'. This path is outside the install directory of Python, and may have different permissions, potentially allowing a low-privilege user to create the landmark and an alternative `Lib` folder that will be discovered by an otherwise restricted install. Such a setup occurs with the legacy default install location for all users (in the now superseded EXE installer), due to how Windows allows all users to create folders in the root directory of their OS drive. Our recommended mitigation on Windows is to migrate away from the legacy installer and use the new [Python install manager](https://www.python.org/downloads/latest/pymanager/) to install for the current user. Installs where the directory two levels above the Python installation directory have equivalent permissions are unaffected (in general, a per-user install cannot be modified at all by other users, removing any escalation of privilege risk, and could be directly modified by a privileged user, making the potential tampering irrelevant). Alternative mitigations might include preemptively creating and restricting access to a `Modules` directory. Be aware that only 3.13 and 3.14 will receive updated legacy installers - earlier fixes are only provided as sources. Platforms other than Windows allow VPATH to be overridden, but as they don't usually use a separated directory in the build for binaries, are unlikely to have a landmark reference outside of the install directory. The landmark detection involving VPATH is a fallback for when a more specific landmark - .\pybuilddir.txt - is absent, and was included for compatibility. Future releases of Python will no longer include the fallback, and so builds will need to generate or preserve the pybuilddir.txt file in order to work in-tree. This landmark file has been generated on Windows since 3.11, and on other platforms for longer.

Severity

CVSS 4.0

5.3 medium
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
EPSS
0.1% (unchanged from 0.1% a week ago; 0.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 3rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-06-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-427 Uncontrolled Search Path Element
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-12003 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-12003?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-12003?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-12003 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Python Software Foundation CPythonbefore 3.11.16
Python Software Foundation CPythonfrom 3.12.0 before 3.12.14
Python Software Foundation CPythonfrom 3.13.0 before 3.13.15
Python Software Foundation CPythonfrom 3.14.0 before 3.14.7
Python Software Foundation CPythonfrom 3.15.0a1 before 3.15.0b3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12python3.11no fix listedDEBIAN-CVE-2026-12003
Debian13python3.13no fix listedDEBIAN-CVE-2026-12003
Debian14python3.143.14.9-1DEBIAN-CVE-2026-12003
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 2 morecythonno fix listedUBUNTU-CVE-2026-12003
Red Hathummingbird:1python3, python3.14, python3-idle and 13 more0:3.14.7-1.2.hum1RHSA-2026:67572
Red Hathummingbird:1python3.11, python3.11-idle, python3.11-libs and 4 more0:3.11.16-1.4.hum1RHSA-2026:68135
Red Hathummingbird:1python3.12, python3.12-idle, python3.12-libs and 4 more0:3.12.14-1.3.hum1RHSA-2026:68154
Red Hathummingbird:1python3.13, python3.13-idle, python3.13-libs and 6 more0:3.13.15-1.3.hum1RHSA-2026:68309
Azure Linux3python33.12.9-14AZL-90182

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This Important privilege escalation flaw in Python's VPATH handling affects Windows systems utilizing legacy installers. Red Hat Enterprise Linux environments are not impacted as the vulnerable code path and cannot be exploited by an adversary.

ProductPackageStateAdvisory
Red Hat Hardened Imagespython3-14-main-3.14.7-1.2.hum1Fixed 2026-09-15RHSA-2026:67572
Red Hat Hardened Imagespython3-11-main-3.11.16-1.4.hum1Fixed 2026-09-16RHSA-2026:68135
Red Hat Hardened Imagespython3-12-main-3.12.14-1.3.hum1Fixed 2026-09-16RHSA-2026:68154
Red Hat Hardened Imagespython3-13-main-3.13.15-1.3.hum1Fixed 2026-09-16RHSA-2026:68309
Red Hat Enterprise Linux 10python3.12Not affected
Red Hat Enterprise Linux 10python3.14Not affected
Red Hat Enterprise Linux 6pythonNot affected
Red Hat Enterprise Linux 7pythonNot affected
Red Hat Enterprise Linux 7python3Not affected
Red Hat Enterprise Linux 8python3Not affected
Red Hat Enterprise Linux 8python3.12Not affected
Red Hat Enterprise Linux 8python36:3.6/python36Not affected
Red Hat Enterprise Linux 9python3.12Not affected
Red Hat Enterprise Linux 9python3.14Not affected
Red Hat Enterprise Linux 9python3.9Not affected
Red Hat Hardened Imageshi/pythonNot affected
Red Hat Hardened Imagespython3.10Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-12003.

Attack patterns (CAPEC)

  • CAPEC-38 Leveraging/Manipulating Configuration File Search Paths Likelihood: High · Severity: Very High
  • CAPEC-471 Search Order Hijacking Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON