tarfile extraction filter bypass allows escaping the destination directory
Summary
| CVE | CVE-2026-11940 |
|---|---|
| State | PUBLISHED |
| Assigner | PSF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-06-23 17:16:40 UTC |
| Updated | 2026-06-30 16:16:35 UTC |
| 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. |
Risk And Classification
Primary CVSS: v4.0 7.8 HIGH from [email protected]
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS: 0.005990000 probability, percentile 0.442010000 (date 2026-06-28)
Problem Types: CWE-22 | CWE-59 | CWE-22 CWE-22 | CWE-59 CWE-59
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 7.8 | HIGH | 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/E:X/C... |
| 4.0 | CNA | CVSS | 7.8 | HIGH | 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 |
CVSS v4.0 Breakdown
Attack Vector
NetworkAttack Complexity
LowAttack Requirements
NonePrivileges Required
NoneUser Interaction
NoneConfidentiality
NoneIntegrity
NoneAvailability
NoneSub Conf.
HighSub Integrity
HighSub Availability
NoneCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Python Software Foundation | CPython | affected 3.15.0 python | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/python/cpython/issues/151558 | [email protected] | github.com | |
| github.com/python/cpython/commit/672825e2f36a57e173959b0d9d409d4560dab8df | [email protected] | github.com | |
| github.com/python/cpython/commit/79c06bd5c6afa3c440d50faf7ee1b147c8832b4c | [email protected] | github.com | |
| github.com/python/cpython/commit/27dd970bf6b17ebca7c8ed486a40ab043ed7af8f | [email protected] | github.com | |
| github.com/python/cpython/pull/151559 | [email protected] | github.com | |
| github.com/python/cpython/commit/be13e86f6b9788a6f4d0419dffef72cbae5865c9 | [email protected] | github.com | |
| github.com/python/cpython/commit/771d12dda5140313db0ac550292987975651bbde | [email protected] | github.com | |
| mail.python.org/archives/list/[email protected]/thread/LD6QIISNQFQ... | [email protected] | mail.python.org | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Haruki Oyama (https://github.com/harukioya) (en)
CNA: Stan Ulbrych (https://github.com/StanFromIreland) (en)
CNA: Petr Viktorin (https://github.com/encukou) (en)
There are currently no legacy QID mappings associated with this CVE.