cve.bz

CVE-2024-12718 python software foundation cpython: Path traversal

5.3 mediumEPSS 0.8%

Medium (5.3) in python software foundation cpython. EPSS 0.8% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
0.8% (unchanged from 0.8% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 58th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2025-07-24. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-12718 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-12718?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-12718?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-12718 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Python Software Foundation CPythonbefore 3.9.23
Python Software Foundation CPythonfrom 3.10.0 before 3.10.18
Python Software Foundation CPythonfrom 3.11.0 before 3.11.13
Python Software Foundation CPythonfrom 3.12.0 before 3.12.11
Python Software Foundation CPythonfrom 3.13.0 before 3.13.4
Python Software Foundation CPythonfrom 3.14.0a1 before 3.14.0b3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13pypy3no fix listedDEBIAN-CVE-2024-12718
Debian13python3.133.13.4-1DEBIAN-CVE-2024-12718
Debian14pypy37.3.20+dfsg-2DEBIAN-CVE-2024-12718
Ubuntu24.04:LTSpython3.123.12.3-1ubuntu0.7UBUNTU-CVE-2024-12718 USN-7583-1
Ubuntu25.10python3.143.14.0-1UBUNTU-CVE-2024-12718
Red Hatenterprise_linux:8::appstreampython3-idle, python3-test, platform-python and 5 more0:3.6.8-70.el8_10RHSA-2025:10128
Red Hatenterprise_linux:8::appstreampython3.11, python3.11-libs, python3.11-devel and 4 more0:3.11.13-1.el8_10RHSA-2025:10026
Red Hatenterprise_linux:8::appstreampython3.12, python3.12-libs, python3.12-devel and 4 more0:3.12.11-1.el8_10RHSA-2025:10031
Red Hatenterprise_linux:8::baseospython3, python3-libs, python3-test and 3 more0:3.6.8-70.el8_10RHSA-2025:10128
Red Hatenterprise_linux:8::crbpython3.11, python3.11-idle, python3.11-test and 4 more0:3.11.13-1.el8_10RHSA-2025:10026
Red Hatenterprise_linux:8::crbpython3.12, python3.12-idle, python3.12-test and 4 more0:3.12.11-1.el8_10RHSA-2025:10031
Red Hatenterprise_linux:9::appstreampython3-devel, python3-tkinter, python3.9-debuginfo and 2 more0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hatenterprise_linux:9::appstreampython3.11, python3.11-libs, python3.11-devel and 3 more0:3.11.11-2.el9_6.1RHSA-2025:10148
Red Hatenterprise_linux:9::appstreampython3.12, python3.12-libs, python3.12-devel and 3 more0:3.12.9-1.el9_6.1RHSA-2025:10189
Red Hatenterprise_linux:9::baseospython3, python3.9, python3-libs and 2 more0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hatenterprise_linux:9::crbpython3, python3-idle, python3-test and 4 more0:3.9.21-2.el9_6.1RHSA-2025:10136
Red Hatenterprise_linux:9::crbpython3.11, python3.11-idle, python3.11-test and 4 more0:3.11.11-2.el9_6.1RHSA-2025:10148
13 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 19 morepython3-core3.6.15-150300.10.97.1SUSE-SU-2025:02778-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 17 morepython33.6.15-150300.10.97.2SUSE-SU-2025:02778-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Server 15 SP3-LTSS and 3 morepython39, python39-core3.9.23-150300.4.75.1SUSE-SU-2025:02050-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 5 morepython311, python311-core, python311-documentation3.11.13-150400.9.60.1SUSE-SU-2025:02049-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Server 15 SP4-LTSS and 1 morepython310, python310-core3.10.18-150400.4.82.1SUSE-SU-2025:02047-1
SUSELinux Enterprise Micro 5.1python3, python3-core3.6.15-150000.3.182.1SUSE-SU-2025:02427-1
SUSELinux Enterprise Module for Basesystem 15 SP6, Linux Enterprise Module for Basesystem 15 SP7python311-core3.11.13-150600.3.30.1SUSE-SU-2025:02057-1
SUSELinux Enterprise Module for Public Cloud 15 SP4python311, python311-core3.11.13-150400.9.60.1SUSE-SU-2025:02049-1
SUSELinux Enterprise Module for Python 3 15 SP6python312, python312-core3.12.11-150600.3.30.1SUSE-SU-2025:02048-1
SUSELinux Enterprise Module for Python 3 15 SP6, Linux Enterprise Module for Python 3 15 SP7python311, python311-core3.11.13-150600.3.30.1SUSE-SU-2025:02057-1
SUSELinux Enterprise Module for Python 3 15 SP7python313, python313-core3.13.5-150700.4.11.1SUSE-SU-2025:02074-1
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5python3, python3-base3.4.10-25.169.1SUSE-SU-2026:0210-1
3 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6python33.6.15-150300.10.97.2SUSE-SU-2025:02778-1
openSUSELeap 15.6python3-core, python3-documentation3.6.15-150300.10.97.1SUSE-SU-2025:02778-1
openSUSELeap 15.6python310, python310-core, python310-documentation3.10.18-150400.4.82.1SUSE-SU-2025:02047-1
openSUSELeap 15.6python311, python311-core, python311-documentation3.11.13-150600.3.30.1SUSE-SU-2025:02057-1
openSUSELeap 15.6python312, python312-core, python312-documentation3.12.11-150600.3.30.1SUSE-SU-2025:02048-1
openSUSELeap 15.6python39, python39-core, python39-documentation3.9.23-150300.4.75.1SUSE-SU-2025:02050-1
openSUSETumbleweedpython3103.10.18-3.1openSUSE-SU-2025:15285-1
openSUSETumbleweedpython3113.11.13-2.1openSUSE-SU-2025:15286-1
openSUSETumbleweedpython3123.12.11-2.1openSUSE-SU-2025:15287-1
openSUSETumbleweedpython3133.13.5-2.1openSUSE-SU-2025:15288-1
openSUSETumbleweedpython393.9.23-3.1openSUSE-SU-2025:15290-1
AlmaLinux8python3-idle, python3-libs, python3-test and 4 more3.6.8-70.el8_10.alma.1ALSA-2025:10128
AlmaLinux8python3.11, python3.11-idle, python3.11-libs and 5 more3.11.13-1.el8_10ALSA-2025:10026
AlmaLinux8python3.12, python3.12-idle, python3.12-libs and 5 more3.12.11-1.el8_10ALSA-2025:10031
AlmaLinux9python3, python3-idle, python3-libs and 5 more3.9.21-2.el9_6.1ALSA-2025:10136
AlmaLinux9python3.11, python3.11-idle, python3.11-libs and 4 more3.11.11-2.el9_6.1ALSA-2025:10148
AlmaLinux9python3.12, python3.12-idle, python3.12-libs and 4 more3.12.9-1.el9_6.1ALSA-2025:10189
AlmaLinux10python-unversioned-command3.12.9-2.el10_0.2ALSA-2025:10140
Rocky Linux8python30:3.6.8-70.el8_10.rocky.0RLSA-2025:10128
Rocky Linux8python3.110:3.11.13-1.el8_10RLSA-2025:10026
Rocky Linux8python3.120:3.12.11-1.el8_10RLSA-2025:10031
Rocky Linux9python3.110:3.11.11-2.el9_6.1RLSA-2025:10148
Rocky Linux9python3.120:3.12.9-1.el9_6.1RLSA-2025:10189
Rocky Linux9python3.90:3.9.21-2.el9_6.1RLSA-2025:10136
Rocky Linux10python3.120:3.12.9-2.el10_0.2RLSA-2025:10140
Alpinev3.19python33.11.13-r0ALPINE-CVE-2024-12718
Alpinev3.20, v3.21, v3.22 and 2 morepython3, python3-tkinter3.12.11-r0ALPINE-CVE-2024-12718
Azure Linux2python33.9.19-14AZL-62258
Alpaquita23python33.11.13-r0BELL-CVE-2024-12718
Alpaquita25, streampython33.12.11-r0BELL-CVE-2024-12718
BellSoft Hardened Containers23python33.11.13-r0BELL-CVE-2024-12718
BellSoft Hardened Containers25, streampython33.12.11-r0BELL-CVE-2024-12718

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Important.

Red Hat's statement

The severity of this vulnerability was lowered due to the fact that successful exploitation requires the attacker to convince a privileged user or process to extract a malicious tar file. Since tar file extraction typically occurs in trusted contexts or with elevated privileges, the impact is reduced by the requirement of such access.

Versions of python36:3.6/python36 as shipped with Red Hat Enterprise Linux 8 are marked as 'Not affected' as they just provide "symlinks" to the main python3 component, which provides the actual interpreter of the Python programming language.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10python3.12-0:3.12.9-2.el10_0.2Fixed 2025-07-01RHSA-2025:10140
Red Hat Enterprise Linux 8python3.11-0:3.11.13-1.el8_10Fixed 2025-07-01RHSA-2025:10026
Red Hat Enterprise Linux 8python3.12-0:3.12.11-1.el8_10Fixed 2025-07-01RHSA-2025:10031
Red Hat Enterprise Linux 8python3-0:3.6.8-70.el8_10Fixed 2025-07-01RHSA-2025:10128
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportpython3-0:3.6.8-47.el8_6.8Fixed 2025-07-07RHSA-2025:10484
Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-Onpython3-0:3.6.8-47.el8_6.8Fixed 2025-07-07RHSA-2025:10484
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicepython3-0:3.6.8-47.el8_6.8Fixed 2025-07-07RHSA-2025:10484
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionspython3-0:3.6.8-47.el8_6.8Fixed 2025-07-07RHSA-2025:10484
Red Hat Enterprise Linux 8.8 Extended Update Support Long-Life Add-Onpython3-0:3.6.8-51.el8_8.10Fixed 2025-07-08RHSA-2025:10602
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicepython3-0:3.6.8-51.el8_8.10Fixed 2025-07-08RHSA-2025:10602
Red Hat Enterprise Linux 8python36:3.6/python36Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-amd-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-aws-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-azure-amd-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-azure-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-gcp-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-intel-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/granite-3.1-8b-lab-v2.1Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/granite-3.1-8b-starter-v2.1Not affected
33 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-12718.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-043-06Siemens SINEC OS2026-01-28Energy, Critical Manufacturing, Transportation Systems, Water and WastewaterRUGGEDCOM RST2428P (6GK6242-6PA00), SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family, SCALANCE XCH328 (6GK5328-4TS01-2EC2) and 13 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON