Cloudanix VulnDB

CVE-2024-12718

Medium · 5.3

CVSS

5.3

EPSS

0.8%

Published

Jun 3, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in Python allows specially made archive files to change information about files or their access rights outside the folder where the archive is being unpacked.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Tampering
Component
Library
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability permits a malicious tar archive to alter file metadata such as modification times using the 'data' filter or change permissions using the 'tar' filter on files located outside the designated extraction directory.

Why it matters to the business

Attackers could tamper with file attributes or permissions across the filesystem, leading to potential integrity issues or unauthorized access modifications without direct code execution.

How an attack unfolds

An attacker crafts a tar file with entries that reference paths outside the extraction target. When a vulnerable Python application extracts it using TarFile.extractall() or extract() with filter='data' or 'tar', the metadata or permissions are applied to files beyond the intended directory.

How to fix it

Upgrade Python to a version containing commit 19de092debb3d7e832e5672cc2f7b788d35951da or later. Avoid using extractall() or extract() with 'data' or 'tar' filters on untrusted archives.

How to confirm the fix worked

Verify Python version is updated and test extraction of crafted archives to confirm no external modifications occur. Check for the presence of the fix commit in the source.

Typical attack path

  1. Craft malicious tar archive with out-of-bounds path references
  2. Deliver archive to application using vulnerable extraction
  3. Trigger extraction with affected filter parameter
  4. Observe metadata or permission changes on external files

How to detect it

Look for log entries indicating extraction of tar files with suspicious paths. Monitor file system for unexpected permission or timestamp changes on files not related to extraction targets.

What your security team should do

  • Prioritize updating Python installations to the fixed version
  • Review code using tarfile extraction filters
  • Implement input validation or sandboxing for archive extraction
  • Monitor for unusual file metadata changes in logs

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:10 python-unversioned-command 0 3.12.9-2.el10_0.2
AlmaLinux:10 python3 0 3.12.9-2.el10_0.2
AlmaLinux:10 python3-debug 0 3.12.9-2.el10_0.2
AlmaLinux:10 python3-devel 0 3.12.9-2.el10_0.2
AlmaLinux:10 python3-idle 0 3.12.9-2.el10_0.2
AlmaLinux:10 python3-libs 0 3.12.9-2.el10_0.2
AlmaLinux:10 python3-test 0 3.12.9-2.el10_0.2
AlmaLinux:10 python3-tkinter 0 3.12.9-2.el10_0.2
AlmaLinux:8 platform-python 0 3.6.8-70.el8_10.alma.1
AlmaLinux:8 platform-python-debug 0 3.6.8-70.el8_10.alma.1
AlmaLinux:8 platform-python-devel 0 3.6.8-70.el8_10.alma.1
AlmaLinux:8 python3-idle 0 3.6.8-70.el8_10.alma.1
AlmaLinux:8 python3-libs 0 3.6.8-70.el8_10.alma.1
AlmaLinux:8 python3-test 0 3.6.8-70.el8_10.alma.1
AlmaLinux:8 python3-tkinter 0 3.6.8-70.el8_10.alma.1
AlmaLinux:8 python3.11 0 3.11.13-1.el8_10
AlmaLinux:8 python3.11-debug 0 3.11.13-1.el8_10
AlmaLinux:8 python3.11-devel 0 3.11.13-1.el8_10
AlmaLinux:8 python3.11-idle 0 3.11.13-1.el8_10
AlmaLinux:8 python3.11-libs 0 3.11.13-1.el8_10
AlmaLinux:8 python3.11-rpm-macros 0 3.11.13-1.el8_10
AlmaLinux:8 python3.11-test 0 3.11.13-1.el8_10
AlmaLinux:8 python3.11-tkinter 0 3.11.13-1.el8_10
AlmaLinux:8 python3.12 0 3.12.11-1.el8_10
AlmaLinux:8 python3.12-debug 0 3.12.11-1.el8_10
AlmaLinux:8 python3.12-devel 0 3.12.11-1.el8_10
AlmaLinux:8 python3.12-idle 0 3.12.11-1.el8_10
AlmaLinux:8 python3.12-libs 0 3.12.11-1.el8_10
AlmaLinux:8 python3.12-rpm-macros 0 3.12.11-1.el8_10
AlmaLinux:8 python3.12-test 0 3.12.11-1.el8_10
AlmaLinux:8 python3.12-tkinter 0 3.12.11-1.el8_10
AlmaLinux:9 python-unversioned-command 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3-debug 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3-devel 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3-idle 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3-libs 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3-test 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3-tkinter 0 3.9.21-2.el9_6.1
AlmaLinux:9 python3.11 0 3.11.11-2.el9_6.1
AlmaLinux:9 python3.11-debug 0 3.11.11-2.el9_6.1
AlmaLinux:9 python3.11-devel 0 3.11.11-2.el9_6.1
AlmaLinux:9 python3.11-idle 0 3.11.11-2.el9_6.1
AlmaLinux:9 python3.11-libs 0 3.11.11-2.el9_6.1
AlmaLinux:9 python3.11-test 0 3.11.11-2.el9_6.1
AlmaLinux:9 python3.11-tkinter 0 3.11.11-2.el9_6.1
AlmaLinux:9 python3.12 0 3.12.9-1.el9_6.1
AlmaLinux:9 python3.12-debug 0 3.12.9-1.el9_6.1
AlmaLinux:9 python3.12-devel 0 3.12.9-1.el9_6.1
AlmaLinux:9 python3.12-idle 0 3.12.9-1.el9_6.1
AlmaLinux:9 python3.12-libs 0 3.12.9-1.el9_6.1
AlmaLinux:9 python3.12-test 0 3.12.9-1.el9_6.1
AlmaLinux:9 python3.12-tkinter 0 3.12.9-1.el9_6.1
Alpine:v3.19 python3 0 3.11.13-r0
Alpine:v3.20 python3 0 3.12.11-r0
Alpine:v3.21 python3 0 3.12.11-r0
Alpine:v3.22 python3 0 3.12.11-r0
Bitnami libpython 0 3.9.23
Bitnami python 0 3.9.23
Bitnami python-min 0 3.9.23
Chainguard python-3.13 0 3.13.4-r0
Chainguard python-3.13-base 0 3.13.4-r0
Chainguard python-3.13-base-dev 0 3.13.4-r0
Chainguard python-3.13-dev 0 3.13.4-r0
Chainguard python-3.13-doc 0 3.13.4-r0
Chainguard python-3.13-privileged-netbindservice 0 3.13.4-r0
Chainguard python-3.13-tk 0 3.13.4-r0
Debian:11 jython 0 No fix
Debian:11 python2.7 0 No fix
Debian:11 python3.9 0 No fix
Debian:12 jython 0 No fix
Debian:12 pypy3 0 No fix
Debian:12 python3.11 0 No fix
Debian:13 jython 0 No fix
Debian:13 pypy3 0 No fix
Debian:13 python3.13 0 No fix
Debian:14 pypy3 0 No fix
Debian:14 python3.13 0 3.13.4-1
Mageia:9 python3 0 3.10.18-1.4.mga9
SUSE:Enterprise Storage 7.1 python3 0 3.6.15-150300.10.97.2
SUSE:Enterprise Storage 7.1 python3-core 0 3.6.15-150300.10.97.1
SUSE:Enterprise Storage 7.1 python39 0 3.9.23-150300.4.75.1
SUSE:Enterprise Storage 7.1 python39-core 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS python39 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS python39-core 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python310 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python310-core 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python310 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python310-core 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Micro 5.2 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Micro 5.2 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Micro 5.3 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Micro 5.3 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Micro 5.4 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Micro 5.4 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Micro 5.5 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Micro 5.5 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 python311-core 0 3.11.13-150600.3.30.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Module for Basesystem 15 SP7 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 python311-core 0 3.11.13-150600.3.30.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP4 python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP4 python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Module for Python 3 15 SP6 python311 0 3.11.13-150600.3.30.1
SUSE:Linux Enterprise Module for Python 3 15 SP6 python311-core 0 3.11.13-150600.3.30.1
SUSE:Linux Enterprise Module for Python 3 15 SP6 python312 0 3.12.11-150600.3.30.1
SUSE:Linux Enterprise Module for Python 3 15 SP6 python312-core 0 3.12.11-150600.3.30.1
SUSE:Linux Enterprise Module for Python 3 15 SP7 python311 0 3.11.13-150600.3.30.1
SUSE:Linux Enterprise Module for Python 3 15 SP7 python311-core 0 3.11.13-150600.3.30.1
SUSE:Linux Enterprise Module for Python 3 15 SP7 python313 0 3.13.5-150700.4.11.1
SUSE:Linux Enterprise Module for Python 3 15 SP7 python313-core 0 3.13.5-150700.4.11.1
SUSE:Linux Enterprise Server 12 SP5-LTSS python36 0 3.6.15-84.1
SUSE:Linux Enterprise Server 12 SP5-LTSS python36-core 0 3.6.15-84.1
SUSE:Linux Enterprise Server 15 SP3-LTSS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Server 15 SP3-LTSS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Server 15 SP3-LTSS python39 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise Server 15 SP3-LTSS python39-core 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Server 15 SP4-LTSS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python310 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python310-core 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server 15 SP5-LTSS python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Server 15 SP5-LTSS python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Server 15 SP5-LTSS python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server 15 SP5-LTSS python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server 15 SP5-LTSS python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server 15 SP5-LTSS python39 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise Server 15 SP5-LTSS python39-core 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 python36 0 3.6.15-84.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 python36-core 0 3.6.15-84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 python39 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 python39-core 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python310 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python310-core 0 3.10.18-150400.4.82.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 python3 0 3.6.15-150300.10.97.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 python3-core 0 3.6.15-150300.10.97.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 python311 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 python311-core 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 python311-documentation 0 3.11.13-150400.9.60.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 python39 0 3.9.23-150300.4.75.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 python39-core 0 3.9.23-150300.4.75.1
SUSE:Manager Proxy 4.3 python3 0 3.6.15-150300.10.97.2
SUSE:Manager Proxy 4.3 python3-core 0 3.6.15-150300.10.97.1
SUSE:Manager Server 4.3 python3 0 3.6.15-150300.10.97.2
SUSE:Manager Server 4.3 python3-core 0 3.6.15-150300.10.97.1
Wolfi python-3.13 0 3.13.4-r0
Wolfi python-3.13-base 0 3.13.4-r0
Wolfi python-3.13-base-dev 0 3.13.4-r0
Wolfi python-3.13-dev 0 3.13.4-r0
Wolfi python-3.13-doc 0 3.13.4-r0
Wolfi python-3.13-privileged-netbindservice 0 3.13.4-r0
Wolfi python-3.13-tk 0 3.13.4-r0
openSUSE:Leap 15.6 python3 0 3.6.15-150300.10.97.2
openSUSE:Leap 15.6 python3-core 0 3.6.15-150300.10.97.1
openSUSE:Leap 15.6 python3-documentation 0 3.6.15-150300.10.97.1
openSUSE:Leap 15.6 python310 0 3.10.18-150400.4.82.1
openSUSE:Leap 15.6 python310-core 0 3.10.18-150400.4.82.1
openSUSE:Leap 15.6 python310-documentation 0 3.10.18-150400.4.82.1
openSUSE:Leap 15.6 python311 0 3.11.13-150600.3.30.1
openSUSE:Leap 15.6 python311-core 0 3.11.13-150600.3.30.1
openSUSE:Leap 15.6 python311-documentation 0 3.11.13-150600.3.30.1
openSUSE:Leap 15.6 python312 0 3.12.11-150600.3.30.1
openSUSE:Leap 15.6 python312-core 0 3.12.11-150600.3.30.1
openSUSE:Leap 15.6 python312-documentation 0 3.12.11-150600.3.30.1

Related vulnerabilities