CVEfocus › CVE database › CVE-2026-12003

CVE-2026-12003CPython >3.11 Insecure Input Validation resulting in privilege escalation

CVSS 5.3 MediumEPSS 0.2% (higher than 4% of CVEs)Published 2026-06-16Updated 2026-08-13Assigner: PSF

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.

CWE-427

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
4Fix pending
3Will not fix
125Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10cythonFix pendingUBUNTU-CVE-2026-12003
Ubuntu 26.04cythonNot affected
vulnerable_code_not_present
Ubuntu 25.10cythonWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-12003
Ubuntu 24.04cythonNot affected
vulnerable_code_not_present
Ubuntu 22.04cythonNot affected
vulnerable_code_not_present
Ubuntu 20.04cythonFix pendingUBUNTU-CVE-2026-12003
Ubuntu 18.04cythonFix pendingUBUNTU-CVE-2026-12003
Ubuntu 16.04cythonFix pendingUBUNTU-CVE-2026-12003
Debian 14python3.14Fixed3.14.9-1DEBIAN-CVE-2026-12003
Debian 13python3.13Will not fix
Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned.
DEBIAN-CVE-2026-12003
Debian 12python3.11Will not fix
Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned.
DEBIAN-CVE-2026-12003
Red Hat Enterprise Linux 10python-unversioned-commandNot affected
Red Hat Enterprise Linux 10python3Not affected
Red Hat Enterprise Linux 10python3-debugNot affected
Red Hat Enterprise Linux 10python3-develNot affected
Red Hat Enterprise Linux 10python3-idleNot affected
Red Hat Enterprise Linux 10python3-libsNot affected
Red Hat Enterprise Linux 10python3-testNot affected
Red Hat Enterprise Linux 10python3-tkinterNot affected
Red Hat Enterprise Linux 10python3.12Not affected
Red Hat Enterprise Linux 10python3.14Not affected
Red Hat Enterprise Linux 10python3.14-debugNot affected
Red Hat Enterprise Linux 10python3.14-develNot affected
Red Hat Enterprise Linux 10python3.14-freethreadingNot affected
Red Hat Enterprise Linux 10python3.14-freethreading-debugNot affected
Red Hat Enterprise Linux 10python3.14-freethreading-develNot affected
Red Hat Enterprise Linux 10python3.14-freethreading-idleNot affected
Red Hat Enterprise Linux 10python3.14-freethreading-libsNot affected
Red Hat Enterprise Linux 10python3.14-freethreading-testNot affected
Red Hat Enterprise Linux 10python3.14-freethreading-tkinterNot affected
Red Hat Enterprise Linux 10python3.14-idleNot affected
Red Hat Enterprise Linux 10python3.14-libsNot affected
Red Hat Enterprise Linux 10python3.14-testNot affected
Red Hat Enterprise Linux 10python3.14-tkinterNot affected
Red Hat Enterprise Linux 9python-unversioned-commandNot affected
Red Hat Enterprise Linux 9python3Not affected
Red Hat Enterprise Linux 9python3-debugNot affected
Red Hat Enterprise Linux 9python3-develNot affected
Red Hat Enterprise Linux 9python3-idleNot affected
Red Hat Enterprise Linux 9python3-libsNot affected
Red Hat Enterprise Linux 9python3-testNot affected
Red Hat Enterprise Linux 9python3-tkinterNot affected
Red Hat Enterprise Linux 9python3.12Not affected
Red Hat Enterprise Linux 9python3.12-debugNot affected
Red Hat Enterprise Linux 9python3.12-develNot affected
Red Hat Enterprise Linux 9python3.12-idleNot affected
Red Hat Enterprise Linux 9python3.12-libsNot affected
Red Hat Enterprise Linux 9python3.12-testNot affected
Red Hat Enterprise Linux 9python3.12-tkinterNot affected
Red Hat Enterprise Linux 9python3.14Not affected
Red Hat Enterprise Linux 9python3.14-debugNot affected
Red Hat Enterprise Linux 9python3.14-develNot affected
Red Hat Enterprise Linux 9python3.14-freethreadingNot affected
Red Hat Enterprise Linux 9python3.14-freethreading-debugNot affected
Red Hat Enterprise Linux 9python3.14-freethreading-develNot affected
Red Hat Enterprise Linux 9python3.14-freethreading-idleNot affected
Red Hat Enterprise Linux 9python3.14-freethreading-libsNot affected
Red Hat Enterprise Linux 9python3.14-freethreading-testNot affected
Red Hat Enterprise Linux 9python3.14-freethreading-tkinterNot affected
Red Hat Enterprise Linux 9python3.14-idleNot affected
Red Hat Enterprise Linux 9python3.14-libsNot affected
Red Hat Enterprise Linux 9python3.14-testNot affected
Red Hat Enterprise Linux 9python3.14-tkinterNot affected
Red Hat Enterprise Linux 9python3.9Not affected
Red Hat Enterprise Linux 8platform-pythonNot affected
Red Hat Enterprise Linux 8platform-python-debugNot affected
Red Hat Enterprise Linux 8platform-python-develNot affected
Red Hat Enterprise Linux 8python-PyMySQLNot affected
Red Hat Enterprise Linux 8python-distroNot affected
Red Hat Enterprise Linux 8python-docsNot affected
Red Hat Enterprise Linux 8python-docutilsNot affected
Red Hat Enterprise Linux 8python-noseNot affected
Red Hat Enterprise Linux 8python-nose-docsNot affected
Red Hat Enterprise Linux 8python-pygmentsNot affected
Red Hat Enterprise Linux 8python-pymongoNot affected
Red Hat Enterprise Linux 8python-pymongo-docNot affected
Red Hat Enterprise Linux 8python-sqlalchemyNot affected
Red Hat Enterprise Linux 8python-sqlalchemy-docNot affected
Red Hat Enterprise Linux 8python-virtualenvNot affected
Red Hat Enterprise Linux 8python-virtualenv-docNot affected
Red Hat Enterprise Linux 8python-wheelNot affected
Red Hat Enterprise Linux 8python3Not affected
Red Hat Enterprise Linux 8python3-PyMySQLNot affected
Red Hat Enterprise Linux 8python3-bsonNot affected
Red Hat Enterprise Linux 8python3-distroNot affected
Red Hat Enterprise Linux 8python3-docsNot affected
Red Hat Enterprise Linux 8python3-docutilsNot affected
Red Hat Enterprise Linux 8python3-idleNot affected
Red Hat Enterprise Linux 8python3-libsNot affected
Red Hat Enterprise Linux 8python3-noseNot affected
Red Hat Enterprise Linux 8python3-pygmentsNot affected
Red Hat Enterprise Linux 8python3-pymongoNot affected
Red Hat Enterprise Linux 8python3-pymongo-gridfsNot affected
Red Hat Enterprise Linux 8python3-scipyNot affected
Red Hat Enterprise Linux 8python3-sqlalchemyNot affected
Red Hat Enterprise Linux 8python3-testNot affected
Red Hat Enterprise Linux 8python3-tkinterNot affected
Red Hat Enterprise Linux 8python3-virtualenvNot affected
Red Hat Enterprise Linux 8python3-wheelNot affected
Red Hat Enterprise Linux 8python3-wheel-wheelNot affected
Red Hat Enterprise Linux 8python3.12Not affected
Red Hat Enterprise Linux 8python3.12-debugNot affected
Red Hat Enterprise Linux 8python3.12-develNot affected
Red Hat Enterprise Linux 8python3.12-idleNot affected
Red Hat Enterprise Linux 8python3.12-libsNot affected
Red Hat Enterprise Linux 8python3.12-rpm-macrosNot affected
Red Hat Enterprise Linux 8python3.12-testNot affected
Red Hat Enterprise Linux 8python3.12-tkinterNot affected
Red Hat Enterprise Linux 8python36Not affected
Red Hat Enterprise Linux 8python36-debugNot affected
Red Hat Enterprise Linux 8python36-develNot affected
Red Hat Enterprise Linux 8python36-rpm-macrosNot affected
Red Hat Enterprise Linux 8scipyNot affected
Red Hat Enterprise Linux 7pythonNot affected
Red Hat Enterprise Linux 7python-debugNot affected
Red Hat Enterprise Linux 7python-develNot affected
Red Hat Enterprise Linux 7python-libsNot affected
Red Hat Enterprise Linux 7python-testNot affected
Red Hat Enterprise Linux 7python-toolsNot affected
Red Hat Enterprise Linux 7python3Not affected
Red Hat Enterprise Linux 7python3-debugNot affected
Red Hat Enterprise Linux 7python3-develNot affected
Red Hat Enterprise Linux 7python3-idleNot affected
Red Hat Enterprise Linux 7python3-libsNot affected
Red Hat Enterprise Linux 7python3-testNot affected
Red Hat Enterprise Linux 7python3-tkinterNot affected
Red Hat Enterprise Linux 7tkinterNot affected
Red Hat Enterprise Linux 6pythonNot affected
Red Hat Enterprise Linux 6python-develNot affected
Red Hat Enterprise Linux 6python-libsNot affected
Red Hat Enterprise Linux 6python-testNot affected
Red Hat Enterprise Linux 6python-toolsNot affected
Red Hat Enterprise Linux 6tkinterNot affected

What the vendor says

As published in the CVE record by PSF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.