REDHAT-BUG-2559388: Medium severity Python Software Foundation Python vulnerability
tarfile.tarfilter 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.tarfilter counterpart of CVE-2026-7774, which covered tarfile.datafilter.
Affected Software
Event History
Frequently Asked Questions
What conditions are required for exploitation?
An attacker must be able to supply or influence a malicious tar archive that is extracted with tarfile.extractall() using filter="tar". The files written outside the intended destination are limited by the permissions of the process performing extraction.
Are applications using the tar filter exposed by default?
The issue affects extraction specifically when filter="tar" is used. The provided information does not establish whether an application selects that filter by default.
What can happen if exploitation succeeds?
Crafted link entries, including symlinks with empty or directory-like names, can redirect later archive members outside the intended extraction directory. This can cause files to be written to other locations accessible to the extracting process.
How can I identify potentially affected code?
Review code paths that process untrusted or attacker-influenced tar archives and call tarfile.extractall() with filter="tar". Pay particular attention to services or automation that extract archives under accounts able to write beyond the designated extraction directory.