Not a U.S. government website. NDD is an independent vulnerability database by Volerion and is not affiliated with or endorsed by NIST or NVD.
VOLERION
Volerion Security Research

NOT DEFERRED DATABASE

VULNERABILITIES

CVE-2024-12718 Details

ANALYZED


This CVE record has been analyzed and enriched by NVDAPI.com as an independent party.

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.

Metrics

References to Advisories, Solutions, and Tools

By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.

URLSource(s)Tag(s)
https://github.com/python/cpython/issues/127987 CISA-ADPExploitIssue TrackingTechnical DescriptionVendor
https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42f [email protected]ExploitRemedy
https://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da [email protected]
https://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9 [email protected]
https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a [email protected]Source CodeVendor

see all 14 references

Weakness Enumeration

CWE-IDCWE NameSource
CWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')[email protected]

Affected Products

ProductVersions
Python
>= 3.12, < 3.14

CPE

  • cpe:2.3:a:python:python:*:*:*:*:*:*:*:*

Remediation

  • Upgrade: 3.14moderate effort
  • Upgrade: 3.13moderate effort
  • Upgrade: 3.12moderate effort
  • Upgrade: 3.11moderate effort
  • Upgrade: 3.10moderate effort
  • Upgrade: 3.9moderate effort
  • Mitigation:low effort

    Reject all links with the parent directory segment ('..') prior to calling extract: for member in tar.getmembers(): if not member.islnk(): continue if os.pardir in os.path.split(member.linkname): raise OSError("Tarfile with insecure segment ('..') in linkname") # Now safe to extract members with the data filter. tar.extractall(filter="data")

Change History

8 change records found show changes


QUICK INFO

CVE Dictionary Entry:
CVE-2024-12718
NVD Published Date:
Jun 3, 2025
NVD Last Modified:
Jul 31, 2026
Source:
[email protected]