Description
The tarfile module's tar and data
extraction filters created directories outside the destination for
members whose name leaves the destination and returns to it, such as ../evil/../dest/sub/file. The containment check used the resolved path, but intermediate directories were created from the name as given.

Only
empty directories are created outside the destination. Member contents
are still extracted inside it. To return to the destination the member's
name must contain the destination directory's own final component, so
extraction into a secure randomised directory is not affected.

This affects POSIX platforms only. On Windows, .. components are collapsed before the path reaches the filesystem, so the directories outside the destination are never created.
Published: 2026-08-19
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The tarfile module’s extraction filters permit members whose names contain a relative traversal sequence that returns to the intended destination. When such a member is processed, the containment check is performed against the resolved path, but the intermediate directories are created from the unnormalized name, allowing the creation of empty directories outside the extraction target. The file contents themselves are still extracted inside the destination, so only the directory structure is affected. This flaw can be used to place arbitrary empty directories adjacent to a path that a process writes to, potentially facilitating other attacks such as repository poisoning or misleading applications that expect all extraction artifacts to be within the target directory.

Affected Systems

This vulnerability is confined to CPython implementations supplied by the Python Software Foundation running on POSIX platforms, including Linux and macOS. Windows is immune because the operating system normalizes '..' components before the filesystem sees the path, preventing the creation of directories outside the destination. Therefore, only systems that execute the tarfile module on a POSIX operating system are affected.

Risk and Exploitability

The CVSS score of 6.3 reflects a moderate severity. The EPSS score is less than 1%, indicating a very low current exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. Attackers would need to supply a crafted tar archive and invoke the extraction routine, so remote exploitation requires either a service that performs extraction on untrusted input or a local user with privileges that allow extraction into a sensitive location. While the ability to create empty directories alone is limited, it may combine with other weaknesses to aid in privilege escalation or other attacks.

Generated by OpenCVE AI on August 28, 2026 at 06:13 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Install the latest CPython release that includes the tarfile extraction filter fix (referenced in https://github.com/python/cpython/pull/156000).
  • If an immediate upgrade is not possible, avoid extracting untrusted archives into directories owned by privileged users; instead, extract into a temporary location with restricted permissions and later copy only the needed files to the target directory.
  • Execute tarfile extraction routines under a non‑privileged user account to limit any unintended directory creation.

Generated by OpenCVE AI on August 28, 2026 at 06:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-23

Thu, 27 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22

Wed, 26 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 26 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
References

Thu, 20 Aug 2026 08:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-23

Thu, 20 Aug 2026 03:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22

Wed, 19 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22

Wed, 19 Aug 2026 17:00:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython

Wed, 19 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
Description The tarfile module's tar and data extraction filters created directories outside the destination for members whose name leaves the destination and returns to it, such as ../evil/../dest/sub/file. The containment check used the resolved path, but intermediate directories were created from the name as given. Only empty directories are created outside the destination. Member contents are still extracted inside it. To return to the destination the member's name must contain the destination directory's own final component, so extraction into a secure randomised directory is not affected. This affects POSIX platforms only. On Windows, .. components are collapsed before the path reaches the filesystem, so the directories outside the destination are never created.
Title tarfile extraction filter bypass allows creation of directories outside the destination
References
Metrics cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-08-27T19:41:14.871Z

Reserved: 2026-08-12T21:17:15.148Z

Link: CVE-2026-19672

cve-icon Vulnrichment

Updated: 2026-08-26T01:30:52.965Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-08-19T16:17:06.593

Modified: 2026-08-28T21:16:15.740

Link: CVE-2026-19672

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T06:15:03Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')