CVE-2026-107784

tarfile extraction filters accept drive-relative paths on Windows

Published Nov 23, 2026 CVSS 4.0 · 6.3 Medium EPSS n/a KEV · Not listed
Description
On Windows, the tarfile "tar" and "data" extraction filters did not reject member names or link targets that have a drive but no root, such as "C:foo". When extracting to a relative destination, such a member was written to the current working directory of that drive instead of the destination, and a symbolic link with such a target pointed outside the destination. The filters now refuse these member names and link targets with AbsolutePathError and AbsoluteLinkError.

Analysis

AI-generated

Technical impact

During tar extraction on Windows, the tarfile module accepted member names or link targets that lacked a root component but included a drive letter, such as "C:foo". The extraction logic wrote those entries to the working directory of that drive instead of the intended destination, while symbolic links could point outside the extraction sandbox. This flaw enabled an attacker controlling a tar archive to place or overwrite files outside the target directory, potentially compromising sensitive data or tampering with system files.

Affected Systems

Python CPython interpreters running on Windows that use the tarfile "tar" or "data" extraction filters. All versions before the fix in the Python 3 codebase (details not enumerated) are susceptible. The vulnerability affects any process that unpacks a tar file without additional path validation.

Risk and Exploitability

The CVSS score of 6.3 indicates moderate severity. No EPSS data are available and the issue is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply a crafted tar archive, which can be delivered through email attachments, downloads, or other social engineering vectors. If the archive is processed by a user who has write permission to the host filesystem, the flaw can lead to arbitrary file creation or modification outside the intended extraction location, thereby exposing the system to data tampering or compromise.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Install the latest CPython release where the tarfile extraction filters have been updated to reject drive-relative paths and raise AbsolutePathError or AbsoluteLinkError.
  • If an immediate upgrade is not feasible, restrict the untrusted data extraction to a directory owned by a non-privileged account and disable following of symbolic links by the extraction process.
  • Validate archive members externally before extraction by checking for paths that start with a drive letter followed by a colon but no root component, and reject or sanitize them to prevent cross-directory writes.

Generated by OpenCVE AI on November 23, 2026 at 16:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Python
Python cpython
Python Software Foundation
Python Software Foundation cpython
Vendors & Products Python
Python cpython
Python Software Foundation
Python Software Foundation cpython
Type Values Removed Values Added
Description On Windows, the tarfile "tar" and "data" extraction filters did not reject member names or link targets that have a drive but no root, such as "C:foo". When extracting to a relative destination, such a member was written to the current working directory of that drive instead of the destination, and a symbolic link with such a target pointed outside the destination. The filters now refuse these member names and link targets with AbsolutePathError and AbsoluteLinkError.
Title tarfile extraction filters accept drive-relative paths on Windows
Weaknesses CWE-22
CWE-59
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-22

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

  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Nov 23, 2026, 4:11 PM
Reserved
Oct 8, 2026, 8:13 PM
Status
Awaiting Analysis
Published
Nov 23, 2026, 4:17 PM
Modified
Nov 23, 2026, 4:17 PM