Vulnerability · Published Jun 23, 2026 · Assigned by PSF
CVE-2026-11940tarfile extraction filter bypass allows escaping the destination directory
High 7.8
In plain English
A high-severity path traversal in CPython from Python Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 55% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
tarfile.extractall() with the 'data' or 'tar' filter could be bypassed by a crafted archive where a hardlink references a symlink stored at a deeper name than the hardlink itself. The extraction fallback validated the symlink at it's archived location but recreated it at the hardlink's shallower path, letting a relative target the filter judged contained escape the destination directory. This allowed a malicious tar archive to create a symlink pointing outside the destination, enabling out-of-destination file reads or writes. This was an incomplete fix of CVE-2025-4330.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | platform-python | 3.6.8-78.el8_10.alma.1 | ALSA-2026:56219 |
| AlmaLinux:8 | platform-python-debug | 3.6.8-78.el8_10.alma.1 | ALSA-2026:56219 |
| AlmaLinux:8 | platform-python-devel | 3.6.8-78.el8_10.alma.1 | ALSA-2026:56219 |
| AlmaLinux:10 | python-unversioned-command | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:9 | python-unversioned-command | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:10 | python3 | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:9 | python3 | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:10 | python3-debug | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:9 | python3-debug | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:10 | python3-devel | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:9 | python3-devel | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:10 | python3-idle | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:8 | python3-idle | 3.6.8-78.el8_10.alma.1 | ALSA-2026:56219 |
| AlmaLinux:9 | python3-idle | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:10 | python3-libs | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:8 | python3-libs | 3.6.8-78.el8_10.alma.1 | ALSA-2026:56219 |
| AlmaLinux:9 | python3-libs | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:10 | python3-test | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:8 | python3-test | 3.6.8-78.el8_10.alma.1 | ALSA-2026:56219 |
| AlmaLinux:9 | python3-test | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:10 | python3-tkinter | 3.12.14-1.el10_2 | ALSA-2026:58902 |
| AlmaLinux:8 | python3-tkinter | 3.6.8-78.el8_10.alma.1 | ALSA-2026:56219 |
| AlmaLinux:9 | python3-tkinter | 3.9.25-7.el9_8.3 | ALSA-2026:54268 |
| AlmaLinux:8 | python3.12 | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:9 | python3.12 | 3.12.14-1.el9_8 | ALSA-2026:59009 |
| AlmaLinux:8 | python3.12-debug | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:9 | python3.12-debug | 3.12.14-1.el9_8 | ALSA-2026:59009 |
| AlmaLinux:8 | python3.12-devel | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:9 | python3.12-devel | 3.12.14-1.el9_8 | ALSA-2026:59009 |
| AlmaLinux:8 | python3.12-idle | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:9 | python3.12-idle | 3.12.14-1.el9_8 | ALSA-2026:59009 |
| AlmaLinux:8 | python3.12-libs | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:9 | python3.12-libs | 3.12.14-1.el9_8 | ALSA-2026:59009 |
| AlmaLinux:8 | python3.12-rpm-macros | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:8 | python3.12-test | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:9 | python3.12-test | 3.12.14-1.el9_8 | ALSA-2026:59009 |
| AlmaLinux:8 | python3.12-tkinter | 3.12.14-1.el8_10 | ALSA-2026:58971 |
| AlmaLinux:9 | python3.12-tkinter | 3.12.14-1.el9_8 | ALSA-2026:59009 |
| AlmaLinux:10 | python3.14 | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14 | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-debug | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-debug | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-devel | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-devel | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-freethreading | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-freethreading | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-freethreading-debug | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-freethreading-debug | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-freethreading-devel | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-freethreading-devel | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-freethreading-idle | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-freethreading-idle | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-freethreading-libs | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-freethreading-libs | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-freethreading-test | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-freethreading-test | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-freethreading-tkinter | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-freethreading-tkinter | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-idle | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-idle | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-libs | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-libs | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-test | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-test | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| AlmaLinux:10 | python3.14-tkinter | 3.14.7-2.el10_2 | ALSA-2026:58928 |
| AlmaLinux:9 | python3.14-tkinter | 3.14.7-2.el9_8 | ALSA-2026:58901 |
| Alpine:v3.21 | python3 | 3.12.14-r0 | ALPINE-CVE-2026-11940 |
| Alpine:v3.22 | python3 | 3.12.14-r0 | ALPINE-CVE-2026-11940 |
| Alpine:v3.23 | python3 | 3.12.14-r0 | ALPINE-CVE-2026-11940 |
| Alpine:v3.24 | python3 | 3.14.7-r0 | ALPINE-CVE-2026-11940 |
| Debian:13 | pypy3 | no fix listed | DEBIAN-CVE-2026-11940 |
| Debian:14 | pypy3 | 8.0.0+dfsg-1 | DEBIAN-CVE-2026-11940 |
| Debian:12 | python3.11 | no fix listed | DEBIAN-CVE-2026-11940 |
| Debian:13 | python3.13 | 3.13.5-2+deb13u5 | DEBIAN-CVE-2026-11940 |
| Debian:14 | python3.14 | 3.14.7-1 | DEBIAN-CVE-2026-11940 |
| Rocky Linux:8 | python3 | 0:3.6.8-78.el8_10.rocky.0 | RLSA-2026:56219 |
| Rocky Linux:10 | python3.12 | 0:3.12.14-1.el10_2 | RLSA-2026:58902 |
| Rocky Linux:8 | python3.12 | 0:3.12.14-1.el8_10 | RLSA-2026:58971 |
| Rocky Linux:9 | python3.12 | 0:3.12.14-1.el9_8 | RLSA-2026:59009 |
| Rocky Linux:10 | python3.14 | 0:3.14.7-2.el10_2 | RLSA-2026:58928 |
| Rocky Linux:9 | python3.14 | 0:3.14.7-2.el9_8 | RLSA-2026:58901 |
| Rocky Linux:9 | python3.9 | 0:3.9.25-7.el9_8.3 | RLSA-2026:54268 |
| Ubuntu:22.04:LTS | pypy3 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:24.04:LTS | pypy3 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:25.10 | pypy3 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:26.04:LTS | pypy3 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:26.10 | pypy3 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:22.04:LTS | python3.10 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:24.04:LTS | python3.12 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:25.10 | python3.13 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:25.10 | python3.14 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:26.04:LTS | python3.14 | no fix listed | UBUNTU-CVE-2026-11940 |
| Ubuntu:26.10 | python3.14 | no fix listed | UBUNTU-CVE-2026-11940 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0 – before 3.10.213.11.0 – before 3.11.163.12.0 – before 3.12.143.13.0 – before 3.13.153.14.0 – before 3.14.73.15.0a1 – before 3.15.0b4 |
Weakness: CWE-22, CWE-59 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
References
- https://github.com/python/cpython/pull/151559 patch
- https://mail.python.org/archives/list/security-announce@python.org/thread/LD6QIISNQFQYOIEPJNEUIPV7S3V76FZH/ vendor-advisory
- https://github.com/python/cpython/issues/151558 issue-tracking
- https://github.com/python/cpython/commit/27dd970bf6b17ebca7c8ed486a40ab043ed7af8f patch
- https://github.com/python/cpython/commit/672825e2f36a57e173959b0d9d409d4560dab8df patch
- https://github.com/python/cpython/commit/771d12dda5140313db0ac550292987975651bbde patch
- https://github.com/python/cpython/commit/79c06bd5c6afa3c440d50faf7ee1b147c8832b4c patch
- https://github.com/python/cpython/commit/be13e86f6b9788a6f4d0419dffef72cbae5865c9 patch
- https://github.com/python/cpython/commit/e5fdbd8d5aa923bd9111b112ea73bd6ec7c47877 patch
- https://github.com/python/cpython/commit/0f852b3f07dd8e71e40326a51c02afbf16a42cc5 patch