CVE-2024-12718 json
Bypass extraction filter to modify file metadata outside extraction directory
published 2025-06-03 17 mo ago modified 2026-07-31 3 mo ago also BIT-libpython-2024-12718 , BIT-python-2024-12718 , BIT-python-min-2024-12718 , EUVD-2024-54644
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 57%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami libpython 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
- bitnami python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
- bitnami python-min 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4
- Python Software Foundation CPython 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4, 3.14.0b3
- pypy3 Debian 14 7.3.20+dfsg-2
- python3.13 Debian 13 3.13.4-1
debian advisories DEBIAN-CVE-2024-12718
- python3.12 Ubuntu 24.04 LTS 3.12.3-1ubuntu0.7
- python3.14 Ubuntu 25.10 3.14.0-1
ubuntu advisories UBUNTU-CVE-2024-12718
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python3.12 RHEL 9 3.12.9-1.el9_6.1
- python3.12-idle RHEL 9 3.12.9-1.el9_6.1
- python3.12-libs RHEL 9 3.12.9-1.el9_6.1
- python3.12-test RHEL 9 3.12.9-1.el9_6.1
- python3.12-tkinter RHEL 9 3.12.9-1.el9_6.1
- python3.11 RHEL 9 3.11.11-2.el9_6.1
- python3.11-idle RHEL 9 3.11.11-2.el9_6.1
- python3.11-libs RHEL 9 3.11.11-2.el9_6.1
red hat advisories RHSA-2025:10602RHSA-2025:10484RHSA-2025:10399RHSA-2025:10189RHSA-2025:10148RHSA-2025:10140
- python3 SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +18 more 3.6.15-150300.10.97.2
- python3-core SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +20 more 3.6.15-150300.10.97.1
- python3-documentation openSUSE Leap 15.6 3.6.15-150300.10.97.1
- python311 Linux Micro 6.1 3.11.13-slfo.1.1_1.1
- python311-core Linux Micro 6.1 3.11.13-slfo.1.1_1.1
- python3 SLE Micro 5.1 3.6.15-150000.3.182.1
- python3-core SLE Micro 5.1 3.6.15-150000.3.182.1
- python311 Linux Micro 6.0 3.11.13-1.1
suse advisories SUSE-SU-2026:0210-1SUSE-SU-2025:02778-1SUSE-SU-2025:20539-1SUSE-SU-2025:02427-1SUSE-SU-2025:02297-1SUSE-SU-2025:20492-1
- python310 openSUSE Tumbleweed 3.10.18-3.1
- python311 openSUSE Tumbleweed 3.11.13-2.1
- python312 openSUSE Tumbleweed 3.12.11-2.1
- python313 openSUSE Tumbleweed 3.13.5-2.1
- python39 openSUSE Tumbleweed 3.9.23-3.1
opensuse advisories openSUSE-SU-2025:15285-1openSUSE-SU-2025:15286-1openSUSE-SU-2025:15287-1openSUSE-SU-2025:15288-1openSUSE-SU-2025:15290-1
- python3.12 AlmaLinux 9 3.12.9-1.el9_6.1
- python3.12-idle AlmaLinux 9 3.12.9-1.el9_6.1
- python3.12-libs AlmaLinux 9 3.12.9-1.el9_6.1
- python3.12-test AlmaLinux 9 3.12.9-1.el9_6.1
- python3.12-tkinter AlmaLinux 9 3.12.9-1.el9_6.1
- python3.11 AlmaLinux 8 3.11.13-1.el8_10
- python3.11-idle AlmaLinux 8 3.11.13-1.el8_10
- python3.11-libs AlmaLinux 8 3.11.13-1.el8_10
almalinux advisories ALSA-2025:10189ALSA-2025:10026ALSA-2025:10031ALSA-2025:10128ALSA-2025:10136ALSA-2025:10140
- python3 Rocky Linux 8 3.6.8-70.el8_10.rocky.0
- python3.9 Rocky Linux 9 3.9.21-2.el9_6.1
- python3.11 Rocky Linux 9 3.11.11-2.el9_6.1
- python3.12 Rocky Linux 9 3.12.9-1.el9_6.1
- python3.12 Rocky Linux 10 3.12.9-2.el10_0.2
- python3.11 Rocky Linux 8 3.11.13-1.el8_10
- python3.12 Rocky Linux 8 3.12.11-1.el8_10
rocky linux advisories RLSA-2025:10128RLSA-2025:10136RLSA-2025:10148RLSA-2025:10189RLSA-2025:10140RLSA-2025:10026
- python3 Alpine 3.19 3.11.13-r0
- python3 Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.12.11-r0
- python3-tkinter Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.12.11-r0
alpine advisories ALPINE-CVE-2024-12718
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/python/cpython@3612d8f commit
- github.com/python/cpython@9e0ac76 commit
- github.com/python/cpython@19de092 commit
- github.com/python/cpython@28463db commit
- github.com/python/cpython@4633f3f commit
- github.com/python/cpython@9c1110e commit
- github.com/python/cpython@aa9eb5f commit
- github.com/python/cpython@dd8f187 commit
- github.com/python/cpython#135037 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-12718 updated cvss 7.6
cpython: python: Bypass extraction filter to modify file metadata outside extraction directory
-
Red Hat cert-manager operator for Red Hat OpenShift 1.16 cert-manager v1.16.5-1760515757fixed: vendor fix RHSA-2025:18219
-
Red Hat Middleware Containers for OpenShift rhpam-7/rhpam-operator-bundle 7.13.5-25, rhpam-7/rhpam-rhel8-operator 7.13.5-2.1752065733, rhpam-7/rhpam-kieserver-rhel8 7.13.5-4.1752065731, rhpam-7/rhpam-controller-rhel8 7.13.5-4.1752065732, rhpam-7/rhpam-dashbuilder-rhel8 7.13.5-3.1752065737, rhpam-7/rhpam-smartrouter-rhel8 7.13.5-4.1752065755, +3 morefixed: vendor fix RHSA-2025:11386
-
Red Hat CodeReady Linux Builder EUS (v.9.4) python3 3.9.18-3.el9_4.8, python3.11 3.11.7-1.el9_4.8, python3.12 3.12.1-4.el9_4.6, python3-idle 3.9.18-3.el9_4.8, python3-test 3.9.18-3.el9_4.8, python3-tkinter 3.9.18-3.el9_4.8, +6 morefixed: vendor fix RHSA-2025:10399
-
Red Hat Discovery 2 discovery 2.0.1-1754478727fixed: vendor fix RHSA-2025:13267
-
Red Hat Enterprise Linux AppStream (v. 8) python3.11 3.11.13-1.el8_10, python3.12 3.12.11-1.el8_10, python3-idle 3.6.8-70.el8_10, python3-test 3.6.8-70.el8_10, platform-python 3.6.8-70.el8_10, python3-tkinter 3.6.8-70.el8_10, +6 morefixed: vendor fix RHSA-2025:10128
-
Red Hat Enterprise Linux AppStream (v. 9) python3.12 3.12.9-1.el9_6.1, python3.11 3.11.11-2.el9_6.1, python3-tkinter 3.9.21-2.el9_6.1, python3.12-libs 3.12.9-1.el9_6.1, python3.11-libs 3.11.11-2.el9_6.1, python3.12-tkinter 3.12.9-1.el9_6.1, +2 morefixed: vendor fix RHSA-2025:10136
-
Red Hat Enterprise Linux AppStream (v. 10) python3-tkinter 3.12.9-2.el10_0.2, python-unversioned-command 3.12.9-2.el10_0.2fixed: vendor fix RHSA-2025:10140
-
Red Hat Enterprise Linux AppStream AUS (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8 Red Hat Enterprise Linux AppStream E4S (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
show 21 moreshow fewer
-
Red Hat Enterprise Linux AppStream E4S (v.8.8) python3-idle 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10, python3-tkinter 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux AppStream EUS (v.9.4) python3.11 3.11.7-1.el9_4.8, python3.12 3.12.1-4.el9_4.6, python3-tkinter 3.9.18-3.el9_4.8, python3.11-libs 3.11.7-1.el9_4.8, python3.12-libs 3.12.1-4.el9_4.6, python3.11-tkinter 3.11.7-1.el9_4.8, +2 morefixed: vendor fix RHSA-2025:10399
-
Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.8) python3-idle 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10, python3-tkinter 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux AppStream TUS (v.8.6) python3-idle 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8, python3-tkinter 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux AppStream TUS (v.8.8) python3-idle 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10, python3-tkinter 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux BaseOS (v. 8) python3 3.6.8-70.el8_10, python3-libs 3.6.8-70.el8_10, python3-test 3.6.8-70.el8_10, platform-python 3.6.8-70.el8_10fixed: vendor fix RHSA-2025:10128
-
Red Hat Enterprise Linux BaseOS (v. 9) python3 3.9.21-2.el9_6.1, python3.9 3.9.21-2.el9_6.1, python3-libs 3.9.21-2.el9_6.1fixed: vendor fix RHSA-2025:10136
-
Red Hat Enterprise Linux BaseOS (v. 10) python3 3.12.9-2.el10_0.2, python3.12 3.12.9-2.el10_0.2, python3-libs 3.12.9-2.el10_0.2fixed: vendor fix RHSA-2025:10140
-
Red Hat Enterprise Linux BaseOS AUS (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8 Red Hat Enterprise Linux BaseOS E4S (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux BaseOS E4S (v.8.8) python3 3.6.8-51.el8_8.10, python3-libs 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux BaseOS EUS (v.9.4) python3 3.9.18-3.el9_4.8, python3.9 3.9.18-3.el9_4.8, python3-libs 3.9.18-3.el9_4.8fixed: vendor fix RHSA-2025:10399
-
Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.8) python3 3.6.8-51.el8_8.10, python3-libs 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux BaseOS TUS (v.8.6) python3 3.6.8-47.el8_6.8, python3-libs 3.6.8-47.el8_6.8, python3-test 3.6.8-47.el8_6.8, platform-python 3.6.8-47.el8_6.8fixed: vendor fix RHSA-2025:10484
-
Red Hat Enterprise Linux BaseOS TUS (v.8.8) python3 3.6.8-51.el8_8.10, python3-libs 3.6.8-51.el8_8.10, python3-test 3.6.8-51.el8_8.10, platform-python 3.6.8-51.el8_8.10fixed: vendor fix RHSA-2025:10602
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3 3.9.21-2.el9_6.1, python3.12 3.12.9-1.el9_6.1, python3.11 3.11.11-2.el9_6.1, python3-idle 3.9.21-2.el9_6.1, python3-test 3.9.21-2.el9_6.1, python3-tkinter 3.9.21-2.el9_6.1, +6 morefixed: vendor fix RHSA-2025:10136
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) python3-idle 3.12.9-2.el10_0.2, python3-test 3.12.9-2.el10_0.2fixed: vendor fix RHSA-2025:10140
-
Red Hat Enterprise Linux CRB (v. 8) python3.11 3.11.13-1.el8_10, python3.12 3.12.11-1.el8_10, python3.11-idle 3.11.13-1.el8_10, python3.11-test 3.11.13-1.el8_10, python3.12-idle 3.12.11-1.el8_10, python3.12-test 3.12.11-1.el8_10, +2 morefixed: vendor fix RHSA-2025:10026
-
Red Hat OpenShift Serverless 1.36 openshift-serverless-1/logic-rhel8-operator 1.36.0-18, openshift-serverless-1/logic-operator-bundle 1.36.0-12, openshift-serverless-1/logic-swf-devmode-rhel8 1.36.0-7, openshift-serverless-1/logic-swf-builder-rhel8 1.36.0-11, openshift-serverless-1/logic-db-migrator-tool-rhel8 1.36.0-11, openshift-serverless-1/logic-management-console-rhel8 1.36.0-9, +5 morefixed: vendor fix RHSA-2026:0934
-
Red Hat cert-manager operator for Red Hat OpenShift 1.16 cert-manager v1.16.5-1760509690 Red Hat Discovery 2 discovery 2.0.1-1754485705 Red Hat Enterprise Linux 8 scipy, python36, python-nose, python-wheel, python3-bson, python3-nose, +19 more Red Hat Enterprise Linux AI (RHEL AI) rhelai1/bootc-amd-rhel9, rhelai1/bootc-intel-rhel9, rhelai1/bootc-nvidia-rhel9, rhelai1/bootc-azure-amd-rhel9, rhelai1/instructlab-amd-rhel9, rhelai1/bootc-aws-nvidia-rhel9, +7 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-043-06 updated cvss 5.3
Siemens SINEC OS
-
Siemens RUGGEDCOM RST2428P (6GK6242-6PA00) < 3.3affected: fixed in V3.3 support.industry.siemens.com
-
Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family < 3.3affected: fixed in V3.3
-
Siemens SCALANCE XCH328 (6GK5328-4TS01-2EC2) < 3.3 Siemens SCALANCE XCM324 (6GK5324-8TS01-2AC2) < 3.3 Siemens SCALANCE XCM328 (6GK5328-4TS01-2AC2) < 3.3 Siemens SCALANCE XCM332 (6GK5332-0GA01-2AC2) < 3.3 Siemens SCALANCE XRH334 (24 V DC, 8xFO, CC) (6GK5334-2TS01-2ER3) < 3.3 Siemens SCALANCE XRM334 (2x230 V AC, 8xFO) (6GK5334-2TS01-4AR3) < 3.3affected: fixed in V3.3 support.industry.siemens.com
+8 more productsfewer
Siemens SCALANCE XRM334 (2x230 V AC, 12xFO) (6GK5334-3TS01-4AR3) < 3.3 Siemens SCALANCE XRM334 (2x230V AC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-4AR3) < 3.3 Siemens SCALANCE XRM334 (24 V DC, 8xFO) (6GK5334-2TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (24 V DC, 12xFO) (6GK5334-3TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (24V DC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-2AR3) < 3.3 Siemens SCALANCE XRM334 (230 V AC, 8xFO) (6GK5334-2TS01-3AR3) < 3.3 Siemens SCALANCE XRM334 (230 V AC, 12xFO) (6GK5334-3TS01-3AR3) < 3.3 Siemens SCALANCE XRM334 (230V AC, 2x10G, 24xSFP, 8xSFP+) (6GK5334-5TS01-3AR3) < 3.3
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 15 mo ago
Exploit prediction
0.83% chance of exploitation in the next 30 days, higher than 57% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/python/cpython/issues/127987 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| OSV | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libpython | <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.9.23 3.10.18 3.11.13 3.12.11 3.13.4 |
| bitnami | python | <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.9.23 3.10.18 3.11.13 3.12.11 3.13.4 |
| bitnami | python-min | <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.9.23 3.10.18 3.11.13 3.12.11 3.13.4 |
Affected products
- Python Software Foundation CPython
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/python/cpython/pull/135037
patch, web
-
github.com
/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a
patch, web
-
github.com
/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a
patch, web
-
github.com
/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da
patch, web
-
github.com
/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9
patch, web
-
github.com
/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e
patch, web
-
github.com
/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a
patch, web
-
github.com
/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01
patch, web
-
github.com
/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1
patch, web
-
github.com
/python/cpython/issues/127987
issue-tracking, exploit, web
-
mail.python.org
/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/
vendor-advisory, web
-
github.com
/python/cpython/issues/135034
issue-tracking, web
-
gist.github.com
/sethmlarson/52398e33eff261329a0180ac1d54f42f
mitigation, web
-
nvd.nist.gov
/vuln/detail/CVE-2024-12718
web
Sources
- CVE List CVE-2024-12718
- NVD CVE-2024-12718
- OSV BIT-libpython-2024-12718
- OSV BIT-python-2024-12718
- OSV BIT-python-min-2024-12718
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.