CVE-2024-12718: Bypass extraction filter to modify file metadata outside extraction directory
Vulnerability summary
CVE-2024-12718 is a medium (CVSS 5.3) vulnerability in python software foundation cpython. EPSS estimates a 0.83% chance of exploitation in the next 30 days, higher than 57.4% of scored vulnerabilities.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 31 · Related 20Timeline
- 03-06-2025PublishedVulnerability first disclosed.
- 31-07-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · AlpineEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · UbuntuEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · DebianEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · WolfiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · ChainguardEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- NVDNIST5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS trend
Probability
0.83%
Chance of exploitation in the next 30 days
Percentile
57%
Versus all other CVEs
30-day change
Increase +0.06 pp
From 0.77% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine2 products
- python3< 3.11.13-r0 | < 3.12.11-r0
- python3-tkinter< 3.12.11-r0
Debian2 products
- pypy3All versions (No fix recorded) | < 7.3.20+dfsg-2
- python3.13< 3.13.4-1
Ubuntu2 products
- python3.12< 3.12.3-1ubuntu0.7
- python3.14< 3.14.0-1
Chainguard1 product
- python-3.13< 3.13.4-r0
Python software foundation1 product
- cpython< 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.14.0a1, < 3.14.0b3
Wolfi1 product
- python-3.13< 3.13.4-r0
6 vendors · 9 products
References
22 links- mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/Vendor AdvisoryREPORTAdvisory
Show all 22 references
- github.com/python/cpythonPACKAGE