CVE-2026-19672
Python Interpreter vulnerability analysis and mitigation

Overview

CVE-2026-19672 is a path traversal vulnerability in Python's tarfile module affecting CPython versions before 3.16.0. The flaw causes the tar and data extraction filters to create empty directories outside the intended extraction destination when processing archive members whose paths leave and re-enter the destination directory (e.g., ../evil/../dest/sub/file). The containment check correctly uses the resolved path, but intermediate directories are created using the raw, unresolved member name. This issue affects POSIX platforms only; Windows is not affected because .. components are collapsed before reaching the filesystem. It was disclosed on August 19, 2026, with a CVSS v4.0 base score of 6.3 (Medium), assigned by the Python Software Foundation (GitHub Advisory, EUVD).

Technical details

The root cause is an inconsistency in how the tarfile module's extraction filters validate versus create paths. The containment check resolves symlinks and .. components to verify the final destination is within bounds, but the os.makedirs() call (or equivalent) uses the member name as-is, allowing intermediate directories like ../evil/ to be created on disk before the path traverses back into the legitimate destination. This is a variant of path traversal (related to CWE-22: Improper Limitation of a Pathname to a Restricted Directory). Exploitation requires that the attacker control the contents of a tar archive that is subsequently extracted by a vulnerable Python application using the tar or data filter. The fix was merged in CPython pull request #156000 and backported to branches 3.10 through 3.15 (CPython PR #156000, GitHub Advisory).

Impact

Successful exploitation allows an unauthenticated attacker who can supply a malicious tar archive to create arbitrary empty directories outside the intended extraction destination on POSIX systems. Critically, only empty directories are created outside the destination — file contents are still extracted within the intended path — limiting the direct impact. However, directory creation in unexpected locations could interfere with application logic, enable race conditions, or facilitate privilege escalation in environments where directory existence is used as a security signal. Confidentiality and availability of the vulnerable system are not directly impacted (GitHub Advisory, EUVD).

Exploitability

As of the disclosure date (August 19, 2026), there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires the attacker to control the contents of a tar archive processed by a vulnerable application, which limits the attack surface to scenarios involving untrusted archive ingestion (GitHub Advisory, EUVD).

Exploitation steps

  1. Craft a malicious tar archive: Create a tar file containing a member with a path that exits and re-enters the extraction destination, such as ../evil/../<dest_final_component>/subdir/file.txt, where <dest_final_component> is the last directory name of the extraction target.
  2. Deliver the archive: Supply the crafted tar file to a target application that extracts archives using Python's tarfile module with the tar or data filter on a POSIX system.
  3. Trigger extraction: The application calls tarfile.extract() or tarfile.extractall() with the filter='tar' or filter='data' argument, processing the malicious member.
  4. Observe directory creation: The tarfile module's containment check passes (the resolved final path is within the destination), but os.makedirs() creates the intermediate ../evil/ directory outside the extraction root before the path returns to the destination.
  5. Leverage created directories: Use the unexpectedly created directories to interfere with application logic, trigger race conditions, or exploit directory-existence checks in the target environment (CPython PR #156000, GitHub Advisory).

Indicators of compromise

  • File System: Unexpected empty directories created outside the intended tar extraction destination directory, particularly directories whose names correspond to path components in archive member names.
  • Logs: Application logs showing tar extraction operations on archives from untrusted or external sources; errors or warnings from Python's tarfile module related to path handling.
  • Process: Python processes invoking tarfile.extractall() or tarfile.extract() with filter='tar' or filter='data' on POSIX systems while processing externally supplied archives.

Mitigation and workarounds

Upgrade CPython to version 3.16.0 or later, which contains the fix. Backports have been prepared for CPython 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15 branches — apply the relevant security update for your Python version once released. As a workaround, extract tar archives into a secure, randomized temporary directory (e.g., using tempfile.mkdtemp()), as the vulnerability requires the member's path to contain the destination directory's own final component — randomized directory names are not affected. Additionally, avoid extracting tar archives from untrusted sources, and consider validating all member paths before extraction (CPython PR #156000, GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python Interpreter vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-67422HIGH7.5
  • Python logoPython
  • open-webui
NoYesAug 06, 2026
CVE-2026-19672MEDIUM6.3
  • Python Interpreter logoPython Interpreter
  • python3.8
NoYesAug 19, 2026
CVE-2026-15806MEDIUM6
  • Python Interpreter logoPython Interpreter
  • python3.13
NoYesAug 18, 2026
CVE-2026-17084MEDIUM6
  • Python Interpreter logoPython Interpreter
  • python3
NoYesAug 18, 2026
CVE-2026-18503LOW2.4
  • Python Interpreter logoPython Interpreter
  • python2.7
NoYesAug 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management