Skip to content
OpenAdvisories
Medium · 5.3 CVE-2024-12718 EUVD-2024-54644GHSA-2pg8-h2j6-28xm

Bypass extraction filter to modify file metadata outside extraction directory

Published Jun 3, 2025 · Updated Jul 31, 2026 · Assigned by PSF

Description

Allows modifying some file metadata (e.g. last modified) with filter="data" or file permissions (chmod) with filter="tar" of files outside the extraction directory.
You are affected by this vulnerability if using the tarfile module to extract untrusted tar archives using TarFile.extractall() or TarFile.extract() using the filter= parameter with a value of "data" or "tar". See the tarfile extraction filters documentation https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter  for more information. Only Python versions 3.12 or later are affected by these vulnerabilities, earlier versions don't include the extraction filter feature.

Note that for Python 3.14 or later the default value of filter= changed from "no filtering" to `"data", so if you are relying on this new default behavior then your usage is also affected.

Note that none of these vulnerabilities significantly affect the installation of source distributions which are tar archives as source distributions already allow arbitrary code execution during the build process. However when evaluating source distributions it's important to avoid installing source distributions with suspicious links.

Affected products

VendorProductAffectedFixed
Python Software Foundation CPython < 3.9.23, 3.10.0 – < 3.10.18, 3.11.0 – < 3.11.13, 3.12.0 – < 3.12.11, 3.13.0 – < 3.13.4, 3.14.0a1 – < 3.14.0b3 3.9.23

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pypy3 7.3.20+dfsg-2 —
Debian 13 pypy3 No fix yet —
Debian 13 python3.13 3.13.4-1 —
Debian 12 pypy3 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 25.10 python3.14 3.14.0-1 —
Ubuntu 24.04 LTS python3.12 3.12.3-1ubuntu0.7 USN-7583-1
ReleasePackageFixed inAdvisory
RHEL 10 python3 +8 3.12.9-2.el10_0.2 RHSA-2025:10140
RHEL 9 python3 +8 3.9.21-2.el9_6.1 RHSA-2025:10136
RHEL 9 python3.11 +6 3.11.11-2.el9_6.1 RHSA-2025:10148
RHEL 9 python3.12 +6 3.12.9-1.el9_6.1 RHSA-2025:10189
RHEL 8 python3 +7 3.6.8-70.el8_10 RHSA-2025:10128
RHEL 8 python3.11 +7 3.11.13-1.el8_10 RHSA-2025:10026
RHEL 8 python3.12 +7 3.12.11-1.el8_10 RHSA-2025:10031
Show 8 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.4 EUS python3 +8 3.9.18-3.el9_4.8 RHSA-2025:10399
RHEL 9.4 EUS python3.11 +6 3.11.7-1.el9_4.8 RHSA-2025:9918
RHEL 9.4 EUS python3.12 +6 3.12.1-4.el9_4.6 RHSA-2025:10028
RHEL 8.8 TUS python3 +7 3.6.8-51.el8_8.10 RHSA-2025:10602
RHEL 8.8 EUS Long Life python3 +7 3.6.8-51.el8_8.10 RHSA-2025:10602
RHEL 8.8 E4S python3 +7 3.6.8-51.el8_8.10 RHSA-2025:10602
RHEL 8.6 TUS python3 +7 3.6.8-47.el8_6.8 RHSA-2025:10484
RHEL 8.6 EUS Long Life python3 +7 3.6.8-47.el8_6.8 RHSA-2025:10484
RHEL 8.6 E4S python3 +7 3.6.8-47.el8_6.8 RHSA-2025:10484
RHEL 8.6 AUS python3 +7 3.6.8-47.el8_6.8 RHSA-2025:10484

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 10 python-unversioned-command 3.12.9-2.el10_0.2 ALSA-2025:10140
AlmaLinux 9 python3 +7 3.9.21-2.el9_6.1 ALSA-2025:10136
AlmaLinux 9 python3.11 +6 3.11.11-2.el9_6.1 ALSA-2025:10148
AlmaLinux 9 python3.12 +6 3.12.9-1.el9_6.1 ALSA-2025:10189
AlmaLinux 8 python3-idle +6 3.6.8-70.el8_10.alma.1 ALSA-2025:10128
AlmaLinux 8 python3.11 +7 3.11.13-1.el8_10 ALSA-2025:10026
AlmaLinux 8 python3.12 +7 3.12.11-1.el8_10 ALSA-2025:10031

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 10 python3.12 3.12.9-2.el10_0.2 RLSA-2025:10140
Rocky Linux 9 python3.11 3.11.11-2.el9_6.1 RLSA-2025:10148
Rocky Linux 9 python3.12 3.12.9-1.el9_6.1 RLSA-2025:10189
Rocky Linux 9 python3.9 3.9.21-2.el9_6.1 RLSA-2025:10136
Rocky Linux 8 python3 3.6.8-70.el8_10.rocky.0 RLSA-2025:10128
Rocky Linux 8 python3.11 3.11.13-1.el8_10 RLSA-2025:10026
Rocky Linux 8 python3.12 3.12.11-1.el8_10 RLSA-2025:10031
ReleasePackageFixed inAdvisory
SLES 15 SP7 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES 15 SP7 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES 15 SP7 python311-core 3.11.13-150600.3.30.1 SUSE-SU-2025:02057-1
SLES 15 SP6 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES 15 SP6 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES 15 SP6 python311-core 3.11.13-150600.3.30.1 SUSE-SU-2025:02057-1
SLES 15 SP5 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES 15 SP5 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES 15 SP5 python311 +2 3.11.13-150400.9.60.1 SUSE-SU-2025:02049-1
SLES 15 SP5 python39 +1 3.9.23-150300.4.75.1 SUSE-SU-2025:02050-1
SLES 15 SP4 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES 15 SP4 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES 15 SP4 python310 +1 3.10.18-150400.4.82.1 SUSE-SU-2025:02047-1
SLES 15 SP4 python311 +2 3.11.13-150400.9.60.1 SUSE-SU-2025:02049-1
SLES 15 SP3 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES 15 SP3 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES 15 SP3 python39 +1 3.9.23-150300.4.75.1 SUSE-SU-2025:02050-1
Show 18 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 python3 +1 3.4.10-25.169.1 SUSE-SU-2026:0210-1
SLES 12 SP5 python36 +1 3.6.15-84.1 SUSE-SU-2025:02297-1
SLES 3 python311 +1 3.11.13-150600.3.30.1 SUSE-SU-2025:02057-1
SLES 3 python312 +1 3.12.11-150600.3.30.1 SUSE-SU-2025:02048-1
SLES 3 python313 +1 3.13.5-150700.4.11.1 SUSE-SU-2025:02074-1
SLES for SAP 15 SP5 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES for SAP 15 SP5 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES for SAP 15 SP5 python311 +2 3.11.13-150400.9.60.1 SUSE-SU-2025:02049-1
SLES for SAP 15 SP5 python39 +1 3.9.23-150300.4.75.1 SUSE-SU-2025:02050-1
SLES for SAP 15 SP4 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES for SAP 15 SP4 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES for SAP 15 SP4 python310 +1 3.10.18-150400.4.82.1 SUSE-SU-2025:02047-1
SLES for SAP 15 SP4 python311 +2 3.11.13-150400.9.60.1 SUSE-SU-2025:02049-1
SLES for SAP 15 SP3 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLES for SAP 15 SP3 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLES for SAP 15 SP3 python39 +1 3.9.23-150300.4.75.1 SUSE-SU-2025:02050-1
SLE Micro 6.1 python311 +1 3.11.13-slfo.1.1_1.1 SUSE-SU-2025:20539-1
SLE Micro 6.0 python311 +1 3.11.13-1.1 SUSE-SU-2025:20492-1
SLE Micro 5.5 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLE Micro 5.5 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLE Micro 5.4 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLE Micro 5.4 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLE Micro 5.3 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLE Micro 5.3 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLE Micro 5.2 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLE Micro 5.2 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLE Micro 5.1 python3 +1 3.6.15-150000.3.182.1 SUSE-SU-2025:02427-1
SLE HPC 15 SP5 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLE HPC 15 SP5 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLE HPC 15 SP5 python311 +2 3.11.13-150400.9.60.1 SUSE-SU-2025:02049-1
SLE HPC 15 SP4 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLE HPC 15 SP4 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLE HPC 15 SP4 python310 +1 3.10.18-150400.4.82.1 SUSE-SU-2025:02047-1
SLE HPC 15 SP4 python311 +2 3.11.13-150400.9.60.1 SUSE-SU-2025:02049-1
SLE HPC 15 SP3 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SLE HPC 15 SP3 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SLE HPC 15 SP3 python39 +1 3.9.23-150300.4.75.1 SUSE-SU-2025:02050-1
SUSE Manager Server 4.3 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SUSE Manager Server 4.3 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SUSE Manager Proxy 4.3 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SUSE Manager Proxy 4.3 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SUSE Enterprise Storage 7.1 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
SUSE Enterprise Storage 7.1 python3-core 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
SUSE Enterprise Storage 7.1 python39 +1 3.9.23-150300.4.75.1 SUSE-SU-2025:02050-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python310 3.10.18-3.1 openSUSE-SU-2025:15285-1
openSUSE Tumbleweed python311 3.11.13-2.1 openSUSE-SU-2025:15286-1
openSUSE Tumbleweed python312 3.12.11-2.1 openSUSE-SU-2025:15287-1
openSUSE Tumbleweed python313 3.13.5-2.1 openSUSE-SU-2025:15288-1
openSUSE Tumbleweed python39 3.9.23-3.1 openSUSE-SU-2025:15290-1
openSUSE Leap 15.6 python3 3.6.15-150300.10.97.2 SUSE-SU-2025:02778-1
openSUSE Leap 15.6 python3-core +1 3.6.15-150300.10.97.1 SUSE-SU-2025:02778-1
openSUSE Leap 15.6 python310 +2 3.10.18-150400.4.82.1 SUSE-SU-2025:02047-1
openSUSE Leap 15.6 python311 +2 3.11.13-150600.3.30.1 SUSE-SU-2025:02057-1
openSUSE Leap 15.6 python312 +2 3.12.11-150600.3.30.1 SUSE-SU-2025:02048-1
openSUSE Leap 15.6 python39 +2 3.9.23-150300.4.75.1 SUSE-SU-2025:02050-1
ReleasePackageFixed inAdvisory
Alpine v3.24 python3 +1 3.12.11-r0 —
Alpine v3.23 python3 +1 3.12.11-r0 —
Alpine v3.22 python3 +1 3.12.11-r0 —
Alpine v3.21 python3 +1 3.12.11-r0 —
Alpine v3.20 python3 +1 3.12.11-r0 —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 python3 3.11.13-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3 +7 3.9.23-1.amzn2023.0.1 ALAS2023-2025-1046
Amazon Linux 2023 python3.11 +6 3.11.13-1.amzn2023.0.1 ALAS2023-2025-1045
Amazon Linux 2023 python3.12 +6 3.12.10-2.amzn2023.0.2 ALAS2023-2025-1044

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) python3 3.9.19-14 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 10 python3 +7 3.12.9-2.0.1.el10_0.2 ELSA-2025-10140
Oracle Linux 9 python3 +7 3.9.21-2.el9_6.1 ELSA-2025-10136
Oracle Linux 9 python3.11 +6 3.11.11-2.el9_6.1 ELSA-2025-10148
Oracle Linux 9 python3.12 +6 3.12.9-1.el9_6.1 ELSA-2025-10189
Oracle Linux 8 python3-idle +6 3.6.8-70.0.1.el8_10 ELSA-2025-10128
Oracle Linux 8 python3.11 +7 3.11.13-1.0.1.el8_10 ELSA-2025-10026
Oracle Linux 8 python3.12 +7 3.12.11-1.el8_10 ELSA-2025-10031

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling python-3.13 3.13.4-r0 —

Advisories 50

References