tarfile.data_filter path traversal bypass allows writing outside the extraction directory
CVE-2026-7774Published 4 Jun 2026, 14:21 UTC
Real-world risk
4.2/ 10Medium
Schedule in the normal cycle
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.9
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.data_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() to write files outside the destination directory, subject to the permissions of the extracting process.
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.14; >= 3.14.0, < 3.14.6; >= 3.15.0a1, < 3.15.0b2 | 3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.6, 3.15.0b2 |
What to do
Update to a fixed version: 3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.6, 3.15.0b2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data tamperingWrites or changes important data without gaining execution | From the CVSS vector | 0.70 |
| 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 | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| 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.6% chance of exploitation in 30 days (percentile 50), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.700
- Threat T1: Nothing known0.850
- 10 × impact 0.7 × prerequisites 0.7 × threat 0.854.165
- Rounded to one decimal between 0.1 and 104.2
Exploitation and evidence timeline
- 4 Jun 2026 Published
- 3 Dec 2026 Risk 4.2 (cvss fallback)
Weakness
CWE-22
References
- https://github.com/python/cpython/pull/149487patch
- https://github.com/python/cpython/issues/149486issue-tracking
- https://mail.python.org/archives/list/[email protected]/thread/4FU62L2M6RMMHT2QPGQNPEHHUND7CEX5/vendor-advisory
- https://github.com/python/cpython/commit/0478bd83d82b255e0f29f613367a59d261e7eaa2patch
- https://github.com/python/cpython/commit/0d28f5e46e151718972dfabd91205444d0037b6dpatch
- https://github.com/python/cpython/commit/578411982c16f753f4893532510099ef665117dapatch
- https://github.com/python/cpython/commit/5cf47a248c35c375d610b87b2f72fd1ed454b558patch
- https://github.com/python/cpython/commit/74cca9a92fb7d653e404843a56b8bdc7b0afdbbfpatch
- https://github.com/python/cpython/commit/10a13bee3c24f9c62b602e696334ff2272a40efcpatch
- https://github.com/python/cpython/commit/c063191cb7f9170f9565e305f8aa2b79ab2bf609patch
- http://www.openwall.com/lists/oss-security/2026/06/04/9
- CVE-2026-7774 on CVE.org