CVE-2026-12003CPython >3.11 Insecure Input Validation resulting in privilege escalation
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | cython | Fix pending | UBUNTU-CVE-2026-12003 | |
| Ubuntu 26.04 | cython | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | cython | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-12003 | |
| Ubuntu 24.04 | cython | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | cython | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | cython | Fix pending | UBUNTU-CVE-2026-12003 | |
| Ubuntu 18.04 | cython | Fix pending | UBUNTU-CVE-2026-12003 | |
| Ubuntu 16.04 | cython | Fix pending | UBUNTU-CVE-2026-12003 | |
| Debian 14 | python3.14 | Fixed | 3.14.9-1 | DEBIAN-CVE-2026-12003 |
| Debian 13 | python3.13 | Will 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 12 | python3.11 | Will 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 10 | python-unversioned-command | Not affected | ||
| Red Hat Enterprise Linux 10 | python3 | Not affected | ||
| Red Hat Enterprise Linux 10 | python3-debug | Not affected | ||
| Red Hat Enterprise Linux 10 | python3-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | python3-idle | Not affected | ||
| Red Hat Enterprise Linux 10 | python3-libs | Not affected | ||
| Red Hat Enterprise Linux 10 | python3-test | Not affected | ||
| Red Hat Enterprise Linux 10 | python3-tkinter | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.12 | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14 | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-debug | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-freethreading | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-freethreading-debug | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-freethreading-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-freethreading-idle | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-freethreading-libs | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-freethreading-test | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-freethreading-tkinter | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-idle | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-libs | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-test | Not affected | ||
| Red Hat Enterprise Linux 10 | python3.14-tkinter | Not affected | ||
| Red Hat Enterprise Linux 9 | python-unversioned-command | Not affected | ||
| Red Hat Enterprise Linux 9 | python3 | Not affected | ||
| Red Hat Enterprise Linux 9 | python3-debug | Not affected | ||
| Red Hat Enterprise Linux 9 | python3-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | python3-idle | Not affected | ||
| Red Hat Enterprise Linux 9 | python3-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | python3-test | Not affected | ||
| Red Hat Enterprise Linux 9 | python3-tkinter | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.12 | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.12-debug | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.12-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.12-idle | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.12-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.12-test | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.12-tkinter | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14 | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-debug | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-freethreading | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-freethreading-debug | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-freethreading-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-freethreading-idle | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-freethreading-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-freethreading-test | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-freethreading-tkinter | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-idle | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-test | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.14-tkinter | Not affected | ||
| Red Hat Enterprise Linux 9 | python3.9 | Not affected | ||
| Red Hat Enterprise Linux 8 | platform-python | Not affected | ||
| Red Hat Enterprise Linux 8 | platform-python-debug | Not affected | ||
| Red Hat Enterprise Linux 8 | platform-python-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | python-PyMySQL | Not affected | ||
| Red Hat Enterprise Linux 8 | python-distro | Not affected | ||
| Red Hat Enterprise Linux 8 | python-docs | Not affected | ||
| Red Hat Enterprise Linux 8 | python-docutils | Not affected | ||
| Red Hat Enterprise Linux 8 | python-nose | Not affected | ||
| Red Hat Enterprise Linux 8 | python-nose-docs | Not affected | ||
| Red Hat Enterprise Linux 8 | python-pygments | Not affected | ||
| Red Hat Enterprise Linux 8 | python-pymongo | Not affected | ||
| Red Hat Enterprise Linux 8 | python-pymongo-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | python-sqlalchemy | Not affected | ||
| Red Hat Enterprise Linux 8 | python-sqlalchemy-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | python-virtualenv | Not affected | ||
| Red Hat Enterprise Linux 8 | python-virtualenv-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | python-wheel | Not affected | ||
| Red Hat Enterprise Linux 8 | python3 | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-PyMySQL | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-bson | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-distro | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-docs | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-docutils | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-idle | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-nose | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-pygments | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-pymongo | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-pymongo-gridfs | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-scipy | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-sqlalchemy | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-test | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-tkinter | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-virtualenv | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-wheel | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-wheel-wheel | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12 | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12-debug | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12-idle | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12-rpm-macros | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12-test | Not affected | ||
| Red Hat Enterprise Linux 8 | python3.12-tkinter | Not affected | ||
| Red Hat Enterprise Linux 8 | python36 | Not affected | ||
| Red Hat Enterprise Linux 8 | python36-debug | Not affected | ||
| Red Hat Enterprise Linux 8 | python36-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | python36-rpm-macros | Not affected | ||
| Red Hat Enterprise Linux 8 | scipy | Not affected | ||
| Red Hat Enterprise Linux 7 | python | Not affected | ||
| Red Hat Enterprise Linux 7 | python-debug | Not affected | ||
| Red Hat Enterprise Linux 7 | python-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | python-libs | Not affected | ||
| Red Hat Enterprise Linux 7 | python-test | Not affected | ||
| Red Hat Enterprise Linux 7 | python-tools | Not affected | ||
| Red Hat Enterprise Linux 7 | python3 | Not affected | ||
| Red Hat Enterprise Linux 7 | python3-debug | Not affected | ||
| Red Hat Enterprise Linux 7 | python3-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | python3-idle | Not affected | ||
| Red Hat Enterprise Linux 7 | python3-libs | Not affected | ||
| Red Hat Enterprise Linux 7 | python3-test | Not affected | ||
| Red Hat Enterprise Linux 7 | python3-tkinter | Not affected | ||
| Red Hat Enterprise Linux 7 | tkinter | Not affected | ||
| Red Hat Enterprise Linux 6 | python | Not affected | ||
| Red Hat Enterprise Linux 6 | python-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | python-libs | Not affected | ||
| Red Hat Enterprise Linux 6 | python-test | Not affected | ||
| Red Hat Enterprise Linux 6 | python-tools | Not affected | ||
| Red Hat Enterprise Linux 6 | tkinter | Not 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.
- Python Software Foundation CPython: affected: before 3.11.16, 3.12.0 to before 3.12.14, 3.13.0 to before 3.13.15, 3.14.0 to before 3.14.7, 3.15.0a1 to before 3.15.0b3; fixed in
3.11.16,3.12.14,3.13.15,3.14.7,3.15.0b3
Vendor advisories:
- https://github.com/python/cpython/pull/151545 (patch)
- https://https://mail.python.org/archives/list/security-announce@python.org/thread/JIFOBO7… (vendor-advisory)
- https://github.com/python/cpython/commit/16c40f944b7bff724a403cf4902763d095bb4b2a (patch)
- https://github.com/python/cpython/commit/9e863fab283eddca9c2a8f9d1ee30f4dc243e314 (patch)
- https://github.com/python/cpython/commit/a86de0bc236fbb9452f98998fc8437e9fca35700 (patch)
- https://github.com/python/cpython/commit/b93d6d3399adbd3a5037b6b92fc3587c85ac5d56 (patch)
References
- https://github.com/python/cpython/pull/151545
- https://github.com/python/cpython/issues/151544
- https://https://mail.python.org/archives/list/security-announce@python.org/thread/JIFOBO7UX3LY4VJKJUOKYJV62CFR2IRH/
- https://github.com/python/cpython/commit/16c40f944b7bff724a403cf4902763d095bb4b2a
- https://github.com/python/cpython/commit/9e863fab283eddca9c2a8f9d1ee30f4dc243e314
- https://github.com/python/cpython/commit/a86de0bc236fbb9452f98998fc8437e9fca35700
- https://github.com/python/cpython/commit/b93d6d3399adbd3a5037b6b92fc3587c85ac5d56
- https://github.com/python/cpython/commit/03ab7b44788bfd6b8927e16bcdbd025aa08dce06
- https://github.com/python/cpython/commit/872038377db2e170e0e140b5f8aaedf636b3fbf5
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.