Python CPython up to 3.14.0b1 TarFile.extractall/TarFile.extract path traversal
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.2 | $0-$5k | 0.00 |
Summary
A vulnerability classified as critical was found in Python CPython up to 3.14.0b1. This impacts the function TarFile.extractall/TarFile.extract. The manipulation results in path traversal.
This vulnerability was named CVE-2024-12718. The attack may be performed from remote. There is no available exploit.
Upgrading the affected component is advised.
Details
A vulnerability classified as critical has been found in Python CPython up to 3.14.0b1. Affected is the function TarFile.extractall/TarFile.extract. The manipulation with an unknown input leads to a path traversal vulnerability. CWE is classifying the issue as CWE-22. The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:
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.
The advisory is shared for download at github.com. This vulnerability is traded as CVE-2024-12718 since 12/17/2024. The exploitability is told to be easy. It is possible to launch the attack remotely. The exploitation doesn't require any form of authentication. There are known technical details, but no exploit is available. The MITRE ATT&CK project declares the attack technique as T1006.
The vulnerability scanner Nessus provides a plugin with the ID 240322 (Amazon Linux 2023 : python3.12, python3.12-devel, python3.12-idle (ALAS2023-2025-1044)), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 3.14.0b2 eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (240322), EUVD (EUVD-2024-54644) and CERT Bund (WID-SEC-2025-1231). VulDB is the best source for vulnerability data and more expert information about this specific topic.
Affected
- IBM AIX
- IBM VIOS
- Red Hat Enterprise Linux
- Fedora Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- Gentoo Linux
- Red Hat OpenShift
- SUSE openSUSE
- RESF Rocky Linux
- NetApp ActiveIQ Unified Manager
- Dell Avamar
- IBM TXSeries
- Open Source Python
- IBM QRadar SIEM
- Dell NetWorker
- Dell Secure Connect Gateway
Product
Type
Vendor
Name
Version
License
Website
- Product: https://github.com/python/cpython/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CNA CVSS-B Score: 🔍
CNA CVSS-BT Score: 🔍
CNA Vector: 🔍
CVSSv3
VulDB Meta Base Score: 6.3VulDB Meta Temp Score: 6.2
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Reliability: 🔍
CNA Base Score: 5.3
CNA Vector (PSF): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Path traversalCWE: CWE-22
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 240322
Nessus Name: Amazon Linux 2023 : python3.12, python3.12-devel, python3.12-idle (ALAS2023-2025-1044)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: CPython 3.14.0b2
Patch: github.com
Timeline
12/17/2024 🔍06/03/2025 🔍
06/03/2025 🔍
12/21/2025 🔍
Sources
Product: github.comAdvisory: 127987
Status: Confirmed
CVE: CVE-2024-12718 (🔍)
GCVE (CVE): GCVE-0-2024-12718
GCVE (VulDB): GCVE-100-310968
EUVD: 🔍
CERT Bund: WID-SEC-2025-1231 - Python: Mehrere Schwachstellen
Entry
Created: 06/03/2025 15:50Updated: 12/21/2025 18:58
Changes: 06/03/2025 15:50 (79), 06/03/2025 16:24 (1), 06/24/2025 12:06 (2), 07/25/2025 02:42 (1), 08/06/2025 21:33 (7), 08/09/2025 20:54 (1), 12/21/2025 18:58 (1)
Complete: 🔍
Cache ID: 216::103
VulDB is the best source for vulnerability data and more expert information about this specific topic.
No comments yet. Languages: en.
Please log in to comment.