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

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.

Published: 2025-06-03 Last update: 2026-04-15 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-12718 is rated Moderate Risk (47.2/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.79%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-12718

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-22 0.69% 0.79% +0.10%
2 2026-03-30 0.20% 0.69% +0.49%
3 2026-02-17 0.20%

Full EPSS history (7 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-12718

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.3 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 1.4 [email protected]

Weakness enumeration for CVE-2024-12718

OS Trackers for CVE-2024-12718

vendor priority summary link
alpine medium CVE-2024-12718: 2 source package rows (python3, python3-tkinter); 9 state rows across 8 repos (3.19-main, 3.20-main, 3.21-community, 3.21-main, 3.22-community, 3.22-main, edge-community, edge-main); fixed 9, open 0. https://security.alpinelinux.org/vuln/CVE-2024-12718
debian unimportant CVE-2024-12718 unimportant priority: Debian including 6 source packages (jython, pypy3, python2.7, python3.11, python3.13, python3.9), 16 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 14, open 2. https://security-tracker.debian.org/tracker/CVE-2024-12718
gentoo high CVE-2024-12718: 1 GLSA(s) (202506-07), 2 atom(s) (dev-lang/pypy, dev-lang/python); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2024-12718
redhat high https://access.redhat.com/security/cve/CVE-2024-12718
suse medium CVE-2024-12718 severity moderate: SUSE including 570 source package names (0.0.17-1.1:libpython3_11-1_0-3.11.13-150600.3.30.1, 0.0.17-1.1:libpython3_6m1_0-3.6.15-150300.10.97.1, …), 2365 product×package rows across 361 product lines (Container bci/kiwi, Container bci/spack, … (361 product lines)): Fixed 2049, Known Affected 226, Known Not Affected 90. https://www.suse.com/security/cve/CVE-2024-12718/
ubuntu medium CVE-2024-12718 medium priority: Ubuntu including 12 source packages (python2.7, python3.10, …), 84 status rows across 10 suites (bionic, focal, jammy, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 51, not-affected 16, needs-triage 10, released 7. https://ubuntu.com/security/CVE-2024-12718

Affected software / configurations for CVE-2024-12718

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2024-12718

URL Tags
https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42f
https://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da
https://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9
https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a
https://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e
https://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a
https://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a
https://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01
https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1
https://github.com/python/cpython/issues/127987
https://github.com/python/cpython/issues/135034
https://github.com/python/cpython/pull/135037
https://mail.python.org/archives/list/[email protected]/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/
cvelogic Threat Intelligence