PT-2025-23608 · Python+11 · Python+11

Caleb Brown

+5

·

Published

2025-06-03

·

Updated

2026-05-18

·

CVE-2025-4138

CVSS v2.0

7.8

High

VectorAV:N/AC:L/Au:N/C:C/I:N/A:N
Name of the Vulnerable Software and Affected Versions Python versions 3.12 and later
Description The issue allows the extraction filter to be ignored, enabling symlink targets to point outside the destination directory and the modification of some file metadata. This affects users who extract untrusted tar archives using TarFile.extractall() or TarFile.extract() with the filter parameter set to "data" or "tar". For Python 3.14 and later, the default filter value changed to "data", which also affects usage relying on this new default behavior. The installation of source distributions, which are tar archives, is not significantly affected as they already allow arbitrary code execution during the build process.
Recommendations For Python versions 3.12 and later, consider avoiding the use of the filter parameter with values "data" or "tar" when extracting untrusted tar archives using TarFile.extractall() or TarFile.extract() until a patch is available. As a temporary workaround, consider disabling the extraction filter feature when dealing with untrusted archives. For Python 3.14 and later, be cautious when relying on the new default filter behavior, as it may introduce this issue.

Exploit

Fix

Path traversal

Weakness Enumeration

Related Identifiers

ALSA-2025:10026
ALSA-2025:10031
ALSA-2025:10128
ALSA-2025:10136
ALSA-2025:10140
ALSA-2025:10148
ALSA-2025:10189
ALSA-2025:23530
AZL-62322
BDU:2025-09992
BIT-LIBPYTHON-2025-4138
BIT-PYTHON-2025-4138
BIT-PYTHON-MIN-2025-4138
CESA-2025_10026
CESA-2025_10031
CESA-2025_10128
CLEANSTART-2026-CI66802
CLEANSTART-2026-KM27583
CLEANSTART-2026-SP91806
CVE-2025-4138
ECHO-5B27-F272-CF44
INFSA-2025_10026
INFSA-2025_10031
INFSA-2025_10128
INFSA-2025_10136
INFSA-2025_10148
INFSA-2025_10189
MGASA-2025-0280
OESA-2025-1789
OESA-2025-1790
OESA-2025-1791
OESA-2025-2304
OESA-2025-2305
OESA-2025-2538
PSF-2025-6
RHSA-2025:10026
RHSA-2025:10028
RHSA-2025:10031
RHSA-2025:10128
RHSA-2025:10136
RHSA-2025:10140
RHSA-2025:10148
RHSA-2025:10189
RHSA-2025:10399
RHSA-2025:10484
RHSA-2025:10602
RHSA-2025:9918
RHSA-2025_10026
RHSA-2025_10031
RHSA-2025_10128
RHSA-2025_10136
RHSA-2025_10148
RHSA-2025_10189
SUSE-SU-2025:02047-1
SUSE-SU-2025:02048-1
SUSE-SU-2025:02049-1
SUSE-SU-2025:02050-1
SUSE-SU-2025:02057-1
SUSE-SU-2025:02074-1
SUSE-SU-2025:02297-1
SUSE-SU-2025:02427-1
SUSE-SU-2025:02778-1
SUSE-SU-2025:20492-1
SUSE-SU-2025:20539-1
SUSE-SU-2025_02047-1
SUSE-SU-2025_02049-1
SUSE-SU-2025_02050-1
SUSE-SU-2025_02057-1
SUSE-SU-2025_02297-1
SUSE-SU-2025_02778-1
SUSE-SU-2026:0210-1
USN-7583-1

Affected Products

Almalinux
Astra Linux
Centos
Debian
Ibm Aix
Linuxmint
Python
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu