Description
tarfile.tar_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() with filter="tar" to write files outside the destination directory, subject to the permissions of the extracting process.

This is the tarfile.tar_filter counterpart of CVE-2026-7774, which covered tarfile.data_filter.
Published: 2026-10-22
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Directory traversal allowing unauthorized file writes
Action: Apply Patch
AI Analysis

Impact

The tarfile module’s tar_filter function can be bypassed with specially crafted symlink entries that have empty names or mimic directory names. When such a symlink appears, the filter fails to keep the extraction path within the intended destination, allowing tarfile.extractall(filter="tar") to write files outside the target directory. This flaw results in the creation or overwrite of arbitrary files, and the outcome depends on the permissions of the process performing the extraction. Based on the description, the vulnerability maps to CWE‑22, improper pathname validation.

Affected Systems

Any installation of Python Software Foundation’s CPython that invokes tarfile.extractall with filter="tar" is at risk. The CVE entry does not list specific CPython releases or versions, so all versions that have not applied the fix are potentially affected regardless of the Python release number.

Risk and Exploitability

The vulnerability has a CVSS score of 6.9, indicating a moderately serious risk. The EPSS score is not available, and the flaw is not yet listed in the CISA KEV catalog. The likely attack vector is a malicious tar archive supplied to an application that calls tarfile.extractall with the standard filter. Based on the description, it is inferred that an attacker can write files to arbitrary locations on the file system as long as the extracting process has sufficient permissions, which may lead to data tampering, privilege escalation, or the introduction of malicious code.

Generated by OpenCVE AI on October 23, 2026 at 03:43 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade CPython to a version where tarfile.tar_filter correctly rejects empty or directory-like symlink names, as documented in the official release notes.
  • For legacy systems that cannot be updated immediately, avoid using tarfile.extractall with filter="tar" on untrusted archives; instead validate archive entries manually or use a custom filter that rejects symlinks with empty names.
  • Run untrusted archive extraction in a restricted environment, such as an unprivileged user or a sandboxed container, to limit the impact of any accidental or intentional path traversal.

Generated by OpenCVE AI on October 23, 2026 at 03:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 02 Nov 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 26 Oct 2026 01:15:00 +0000


Fri, 23 Oct 2026 06:45:00 +0000

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

Fri, 23 Oct 2026 04:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22

Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Description tarfile.tar_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() with filter="tar" to write files outside the destination directory, subject to the permissions of the extracting process. This is the tarfile.tar_filter counterpart of CVE-2026-7774, which covered tarfile.data_filter.
Title tar filter allows writing outside destination via empty-named symlink
References
Metrics cvssV4_0

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


Subscriptions

Python Cpython
Python Software Foundation Cpython
cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-11-02T12:32:42.085Z

Reserved: 2026-10-21T18:58:26.985Z

Link: CVE-2026-114583

cve-icon Vulnrichment

Updated: 2026-11-02T12:31:53.561Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-22T21:17:16.543

Modified: 2026-11-02T13:17:35.597

Link: CVE-2026-114583

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T06:30:07Z

Weaknesses
  • CWE-22

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