Description
tarfile.tar_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() with filter="tar" to write files outside the destination directory, subject to the permissions of the extracting process. This is the tarfile.tar_filter counterpart of CVE-2026-7774, which covered tarfile.data_filter.
References9
- github.com/python/cpython/commit/04d8fca7da2cf3ebc0881fec8a53a1…
- github.com/python/cpython/commit/0901ad4ffb22605f12b705d1c1197f…
- github.com/python/cpython/commit/bc93f8ad4c4a0f92d184ec8fccc8ff…
- github.com/python/cpython/commit/c6ada40177436e4e2533a7b252082b…
- github.com/python/cpython/commit/e7e0b3523ad6ba8472873dda594cf4…
- github.com/python/cpython/commit/f4401da82e2baec5dab06cf070fbca…
- github.com/python/cpython/issues/160097
- github.com/python/cpython/pull/160098
- mail.python.org/archives/list/[email protected]/thre…
Metrics
- CVSS 4.0
-
6.9
MEDIUM
Score source: CNA
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/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 — exploit probability
- 0% percentile: 18 · as of 8 November 2026
- CWE
- CWE-22
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.