CVEfocus › CVE database › CVE-2024-12718

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

CVSS 5.3 MediumEPSS 1.2% (higher than 68% of CVEs)Published 2025-06-03Updated 2026-07-31Assigner: PSF

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.

CWE-22

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Debian has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

123Fixed
2Fix pending
35Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10python3.13Not affected
vulnerable_code_not_present
Ubuntu 25.10python3.14Fixed3.14.0-1UBUNTU-CVE-2024-12718
Ubuntu 24.04python3.12Fixed3.12.3-1ubuntu0.7UBUNTU-CVE-2024-12718
Ubuntu 22.04python3.10Not affected
vulnerable_code_not_present
Debian 14pypy3Fixed7.3.20+dfsg-2DEBIAN-CVE-2024-12718
Debian 13pypy3Fix pendingDEBIAN-CVE-2024-12718
Debian 13python3.13Fixed3.13.4-1DEBIAN-CVE-2024-12718
Debian 12pypy3Fix pendingDEBIAN-CVE-2024-12718
Red Hat Enterprise Linux 10python-unversioned-commandFixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3Fixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3-debugFixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3-develFixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3-idleFixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3-libsFixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3-testFixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3-tkinterFixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 10python3.12Fixed0:3.12.9-2.el10_0.2RHSA-2025:10140
Red Hat Enterprise Linux 9python-unversioned-commandFixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3Fixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3-debugFixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3-develFixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3-idleFixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3-libsFixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3-testFixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3-tkinterFixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 9python3.11Fixed0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hat Enterprise Linux 9python3.11-debugFixed0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hat Enterprise Linux 9python3.11-develFixed0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hat Enterprise Linux 9python3.11-idleFixed0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hat Enterprise Linux 9python3.11-libsFixed0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hat Enterprise Linux 9python3.11-testFixed0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hat Enterprise Linux 9python3.11-tkinterFixed0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hat Enterprise Linux 9python3.12Fixed0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hat Enterprise Linux 9python3.12-debugFixed0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hat Enterprise Linux 9python3.12-develFixed0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hat Enterprise Linux 9python3.12-idleFixed0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hat Enterprise Linux 9python3.12-libsFixed0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hat Enterprise Linux 9python3.12-testFixed0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hat Enterprise Linux 9python3.12-tkinterFixed0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hat Enterprise Linux 9python3.9Fixed0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hat Enterprise Linux 8platform-pythonFixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8platform-python-debugFixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8platform-python-develFixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8python-PyMySQLNot affected
Red Hat Enterprise Linux 8python-distroNot affected
Red Hat Enterprise Linux 8python-docsNot affected
Red Hat Enterprise Linux 8python-docutilsNot affected
Red Hat Enterprise Linux 8python-noseNot affected
Red Hat Enterprise Linux 8python-nose-docsNot affected
Red Hat Enterprise Linux 8python-pygmentsNot affected
Red Hat Enterprise Linux 8python-pymongoNot affected
Red Hat Enterprise Linux 8python-pymongo-docNot affected
Red Hat Enterprise Linux 8python-sqlalchemyNot affected
Red Hat Enterprise Linux 8python-sqlalchemy-docNot affected
Red Hat Enterprise Linux 8python-virtualenvNot affected
Red Hat Enterprise Linux 8python-virtualenv-docNot affected
Red Hat Enterprise Linux 8python-wheelNot affected
Red Hat Enterprise Linux 8python3Fixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8python3-PyMySQLNot affected
Red Hat Enterprise Linux 8python3-bsonNot affected
Red Hat Enterprise Linux 8python3-distroNot affected
Red Hat Enterprise Linux 8python3-docsNot affected
Red Hat Enterprise Linux 8python3-docutilsNot affected
Red Hat Enterprise Linux 8python3-idleFixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8python3-libsFixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8python3-noseNot affected
Red Hat Enterprise Linux 8python3-pygmentsNot affected
Red Hat Enterprise Linux 8python3-pymongoNot affected
Red Hat Enterprise Linux 8python3-pymongo-gridfsNot affected
Red Hat Enterprise Linux 8python3-scipyNot affected
Red Hat Enterprise Linux 8python3-sqlalchemyNot affected
Red Hat Enterprise Linux 8python3-testFixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8python3-tkinterFixed0:3.6.8-70.el8_10RHSA-2025:10128
Red Hat Enterprise Linux 8python3-virtualenvNot affected
Red Hat Enterprise Linux 8python3-wheelNot affected
Red Hat Enterprise Linux 8python3-wheel-wheelNot affected
Red Hat Enterprise Linux 8python3.11Fixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.11-debugFixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.11-develFixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.11-idleFixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.11-libsFixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.11-rpm-macrosFixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.11-testFixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.11-tkinterFixed0:3.11.13-1.el8_10RHSA-2025:10026
Red Hat Enterprise Linux 8python3.12Fixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python3.12-debugFixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python3.12-develFixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python3.12-idleFixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python3.12-libsFixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python3.12-rpm-macrosFixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python3.12-testFixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python3.12-tkinterFixed0:3.12.11-1.el8_10RHSA-2025:10031
Red Hat Enterprise Linux 8python36Not affected
Red Hat Enterprise Linux 8python36-debugNot affected
Red Hat Enterprise Linux 8python36-develNot affected
Red Hat Enterprise Linux 8python36-rpm-macrosNot affected
Red Hat Enterprise Linux 8scipyNot affected
AlmaLinux 10python-unversioned-commandFixed3.12.9-2.el10_0.2ALSA-2025:10140
AlmaLinux 9python-unversioned-commandFixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3Fixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3-debugFixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3-develFixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3-idleFixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3-libsFixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3-testFixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3-tkinterFixed3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux 9python3.11Fixed3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux 9python3.11-debugFixed3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux 9python3.11-develFixed3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux 9python3.11-idleFixed3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux 9python3.11-libsFixed3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux 9python3.11-testFixed3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux 9python3.11-tkinterFixed3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux 9python3.12Fixed3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux 9python3.12-debugFixed3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux 9python3.12-develFixed3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux 9python3.12-idleFixed3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux 9python3.12-libsFixed3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux 9python3.12-testFixed3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux 9python3.12-tkinterFixed3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux 8platform-pythonFixed3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux 8platform-python-debugFixed3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux 8platform-python-develFixed3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux 8python3-idleFixed3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux 8python3-libsFixed3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux 8python3-testFixed3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux 8python3-tkinterFixed3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux 8python3.11Fixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.11-debugFixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.11-develFixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.11-idleFixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.11-libsFixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.11-rpm-macrosFixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.11-testFixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.11-tkinterFixed3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux 8python3.12Fixed3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux 8python3.12-debugFixed3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux 8python3.12-develFixed3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux 8python3.12-idleFixed3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux 8python3.12-libsFixed3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux 8python3.12-rpm-macrosFixed3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux 8python3.12-testFixed3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux 8python3.12-tkinterFixed3.12.11-1.el8_10ALSA-2025:10031
Rocky Linux 10python3.12Fixed0:3.12.9-2.el10_0.2RLSA-2025:10140
Rocky Linux 9python3.11Fixed0:3.11.11-2.el9_6.1RLSA-2025:10148
Rocky Linux 9python3.12Fixed0:3.12.9-1.el9_6.1RLSA-2025:10189
Rocky Linux 9python3.9Fixed0:3.9.21-2.el9_6.1RLSA-2025:10136
Rocky Linux 8python3Fixed0:3.6.8-70.el8_10.rocky.0RLSA-2025:10128
Rocky Linux 8python3.11Fixed0:3.11.13-1.el8_10RLSA-2025:10026
Rocky Linux 8python3.12Fixed0:3.12.11-1.el8_10RLSA-2025:10031
Alpine Linux 3.24python3Fixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.23python3Fixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.23python3-tkinterFixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.22python3Fixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.22python3-tkinterFixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.21python3Fixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.21python3-tkinterFixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.20python3Fixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.20python3-tkinterFixed3.12.11-r0ALPINE-CVE-2024-12718
Alpine Linux 3.19python3Fixed3.11.13-r0ALPINE-CVE-2024-12718

What the vendor says

As published in the CVE record by PSF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.