Vulnerability · Published Jun 3, 2025 · Assigned by PSF

CVE-2024-12718Bypass extraction filter to modify file metadata outside extraction directory

Medium 5.3

In plain English

A medium-severity path traversal in CPython from Python Software Foundation. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 58% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.8%top 42.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8platform-python3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux:8platform-python-debug3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux:8platform-python-devel3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux:10python-unversioned-command3.12.9-2.el10_0.2ALSA-2025:10140
AlmaLinux:9python-unversioned-command3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:9python33.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:9python3-debug3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:9python3-devel3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:8python3-idle3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux:9python3-idle3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:8python3-libs3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux:9python3-libs3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:8python3-test3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux:9python3-test3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:8python3-tkinter3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux:9python3-tkinter3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux:8python3.113.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:9python3.113.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux:8python3.11-debug3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:9python3.11-debug3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux:8python3.11-devel3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:9python3.11-devel3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux:8python3.11-idle3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:9python3.11-idle3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux:8python3.11-libs3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:9python3.11-libs3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux:8python3.11-rpm-macros3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:8python3.11-test3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:9python3.11-test3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux:8python3.11-tkinter3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux:9python3.11-tkinter3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux:8python3.123.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:9python3.123.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux:8python3.12-debug3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:9python3.12-debug3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux:8python3.12-devel3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:9python3.12-devel3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux:8python3.12-idle3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:9python3.12-idle3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux:8python3.12-libs3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:9python3.12-libs3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux:8python3.12-rpm-macros3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:8python3.12-test3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:9python3.12-test3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux:8python3.12-tkinter3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux:9python3.12-tkinter3.12.9-1.el9_6.1ALSA-2025:10189
Alpine:v3.20python33.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.21python33.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.22python33.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.23python33.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.24python33.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.20python3-tkinter3.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.21python3-tkinter3.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.22python3-tkinter3.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.23python3-tkinter3.12.11-r0ALPINE-CVE-2024-12718
Alpine:v3.24python3-tkinter3.12.11-r0ALPINE-CVE-2024-12718
Debian:12pypy3no fix listedDEBIAN-CVE-2024-12718
Debian:13pypy3no fix listedDEBIAN-CVE-2024-12718
Debian:14pypy37.3.20+dfsg-2DEBIAN-CVE-2024-12718
Debian:13python3.133.13.4-1DEBIAN-CVE-2024-12718
Rocky Linux:8python30:3.6.8-70.el8_10.rocky.0RLSA-2025:10128
Rocky Linux:8python3.110:3.11.13-1.el8_10RLSA-2025:10026
Rocky Linux:9python3.110:3.11.11-2.el9_6.1RLSA-2025:10148
Rocky Linux:10python3.120:3.12.9-2.el10_0.2RLSA-2025:10140
Rocky Linux:8python3.120:3.12.11-1.el8_10RLSA-2025:10031
Rocky Linux:9python3.120:3.12.9-1.el9_6.1RLSA-2025:10189
Rocky Linux:9python3.90:3.9.21-2.el9_6.1RLSA-2025:10136
Ubuntu:24.04:LTSpython3.123.12.3-1ubuntu0.7USN-7583-1
Ubuntu:24.04:LTSpython3.123.12.3-1ubuntu0.7UBUNTU-CVE-2024-12718
Ubuntu:25.10python3.143.14.0-1UBUNTU-CVE-2024-12718

Affected products (as reported)

VendorProductVersions
Python Software Foundation CPython 0 – before 3.9.233.10.0 – before 3.10.183.11.0 – before 3.11.133.12.0 – before 3.12.113.13.0 – before 3.13.43.14.0a1 – before 3.14.0b3

Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

References