tarfile extraction filter bypass allows escaping the destination directory
CVE-2026-11940Published 23 Jun 2026, 16:04 UTC
Real-world risk
2.6/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
7.8
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from PSF)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| CPythonUbiquitous | < 3.10.21; >= 3.11.0, < 3.11.16; >= 3.12.0, < 3.12.14; >= 3.13.0, < 3.13.15; >= 3.14.0, < 3.14.7; >= 3.15.0a1, < 3.15.0b4 | 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7, 3.15.0b4 |
What to do
Update to a fixed version: 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7, 3.15.0b4.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.8% chance of exploitation in 30 days (percentile 56), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together1.000
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 1 × threat 0.852.550
- Rounded to one decimal between 0.1 and 102.6
Exploitation and evidence timeline
- 23 Jun 2026 Published
- 3 Dec 2026 Risk 2.6 (cvss fallback)
Weakness
CWE-22, CWE-59
References
- https://github.com/python/cpython/pull/151559patch
- https://mail.python.org/archives/list/[email protected]/thread/LD6QIISNQFQYOIEPJNEUIPV7S3V76FZH/vendor-advisory
- https://github.com/python/cpython/issues/151558issue-tracking
- https://github.com/python/cpython/commit/27dd970bf6b17ebca7c8ed486a40ab043ed7af8fpatch
- https://github.com/python/cpython/commit/672825e2f36a57e173959b0d9d409d4560dab8dfpatch
- https://github.com/python/cpython/commit/771d12dda5140313db0ac550292987975651bbdepatch
- https://github.com/python/cpython/commit/79c06bd5c6afa3c440d50faf7ee1b147c8832b4cpatch
- https://github.com/python/cpython/commit/be13e86f6b9788a6f4d0419dffef72cbae5865c9patch
- https://github.com/python/cpython/commit/e5fdbd8d5aa923bd9111b112ea73bd6ec7c47877patch
- https://github.com/python/cpython/commit/0f852b3f07dd8e71e40326a51c02afbf16a42cc5patch
- CVE-2026-11940 on CVE.org