PSF-2025-8: Tarfile extracts filtered members when errorlevel=0
When using a TarFile.errorlevel = 0 and extracting with a filter the documented behavior is that any filtered members would be skipped and not extracted. However the actual behavior of TarFile.errorlevel = 0 in affected versions is that the member would still be extracted and not skipped.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed to this behavior?
Applications are exposed when they use Python's tarfile module, set TarFile.errorlevel to 0, and extract archives with a filter while relying on filtered members being skipped.
What does an attacker need to exploit this issue?
An attacker would need an archive processed by an affected application under the errorlevel=0 and filtered-extraction conditions. Members rejected by the filter may still be extracted.
Are default tarfile extraction settings affected?
The provided information identifies the issue specifically for TarFile.errorlevel=0. It does not establish that default settings are affected.
What can be done if updating is not immediately possible?
Avoid relying on filtered members being skipped when TarFile.errorlevel is set to 0. Use an extraction approach that ensures rejected members are not extracted.