CVE-2026-114583

tar filter allows writing outside destination via empty-named symlink

Published Oct 22, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

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 available
History
Type Values Removed Values Added
Metrics ssvc

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

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
Weaknesses CWE-22
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'}

Weaknesses
  • CWE-22

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

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Nov 2, 2026, 12:32 PM
Reserved
Oct 21, 2026, 6:58 PM
Status
Awaiting Analysis
Published
Oct 22, 2026, 9:17 PM
Modified
Nov 2, 2026, 1:17 PM