PT-2025-23607 · Python+10 · Tarfile+11
CVSS v4.0
10
Critical
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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 |
Name of the Vulnerable Software and Affected Versions
Python versions 3.12 through 3.13
Description
An issue exists in the
tarfile module when extracting untrusted tar archives. When using the TarFile.extractall() or TarFile.extract() functions with the filter parameter set to data or tar, it is possible to modify file metadata (such as last modified time) or file permissions (chmod) for files located outside the intended extraction directory. In Python 3.14 and later, the default value of the filter parameter changed to data, making users who rely on this default behavior susceptible to the issue. This can lead to arbitrary file modification on the system and potential data loss.Recommendations
Update Python 3.12 to version 3.12.7-1ubuntu2.2 or later.
Update Python 3.13 to version 3.13.0-1ubuntu0.3 or later.
As a temporary workaround, avoid using the
filter parameter with values data or tar when extracting untrusted archives using TarFile.extractall() or TarFile.extract().Exploit
Fix
DoS
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Almalinux
Centos
Debian
Ibm Aix
Linuxmint
Python
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu
Tarfile