Skip to main content

CPython EUVDEUVD-2026-34282

| CVE-2026-7774 MEDIUM
Path Traversal (CWE-22)
2026-06-04 PSF GHSA-6cj7-v55x-8mwr
6.9
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft tar archive with bypass symlink entries
  2. Delivery
    Deliver archive to target application or user
  3. Exploit
    Victim calls tarfile.extractall() with data filter
  4. Execution
    Malformed symlink redirects destination directory
  5. Persist
    Subsequent archive members extracted to attacker-chosen paths
  6. Impact
    Arbitrary file write outside intended directory

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim's code to call tarfile.extractall() or use tarfile.data_filter on a malicious archive controlled by the attacker. The vulnerability specifically bypasses the data filter safety mechanism, so applications that already use this filter (the recommended safe extraction mode) are the primary affected population. The CVSS vector UI:A confirms active user interaction is required - an attacker cannot remotely trigger extraction without a human or automated process initiating it. PR:N confirms no authentication on the attacker's side is needed. Exploitation is bounded by the filesystem permissions of the extracting process: files can only be written where that process has write access, so processes running as root or in world-writable directories face the highest risk. Platforms or configurations that do not support symlinks (e.g., certain Windows environments or filesystems mounted with nosymlinks) may not be exploitable via the symlink-based bypass vectors, though the hardlink and empty-name variants may still apply.

Impact

The CVSS 4.0 score of 6.9 reflects a meaningful but constrained risk profile: AV:N (network-reachable attack vector) and AC:L (low complexity) indicate the technique is straightforward once a crafted archive is delivered, while UI:A (active user interaction required) is the primary limiting factor - exploitation requires a victim to extract the archive. PR:N confirms no authentication is needed from the attacker's perspective. The integrity impact is High (VI:H) with no confidentiality or availability impact, meaning a successful attack can silently overwrite or create files anywhere the extracting process has write access. No EPSS score was provided in the source data, so exploitation probability cannot be quantified from that signal. There is no CISA KEV listing, and no POC exploit has been identified in the provided data, making this a patch-priority issue rather than an emergency response scenario. The realistic threat model is an application that processes user-submitted or third-party tar archives using the data filter - a setting Python itself recommends for safe extraction - making the bypass particularly insidious since developers may believe they are already protected.

Exploit ScenarioDerived

An attacker crafts a tar archive containing symlink entries with empty names or trailing slashes whose targets resolve to the destination directory itself or to paths outside it via normpath/realpath divergence. The archive is delivered to a target application or user - for example, as a downloadable file, email attachment, or dependency artifact - and when the victim calls tarfile.extractall() with the data filter, the crafted symlinks redirect subsequent archive members to write files outside the intended extraction directory. No public exploit code has been identified at time of analysis, but the bypass technique is fully documented in the upstream GitHub issue and PR.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 04, 2026

Path traversal in CPython's tarfile module allows malicious tar archives to bypass the data_filter safety mechanism and write files to arbitrary locations outside the intended extraction directory. When an application or user calls tarfile.extractall() with the data filter active, specially crafted symlinks using empty names, directory-like names, or trailing slashes can redirect subsequent archive members through attacker-controlled paths, subject to the permissions of the extracting process. No public exploit has been identified at time of analysis and the vulnerability is not listed in the CISA KEV catalog, but the attack vector is network-accessible and requires only that a victim initiate extraction of a crafted archive (UI:A).

RemediationAI

The upstream fix is available in CPython PR #149487 (https://github.com/python/cpython/pull/149487); based on EUVD affected version range (CPython < 3.15.0), upgrading to CPython 3.15.0 or later addresses this issue, however the exact patched release version is inferred from EUVD data rather than independently confirmed from a tagged release - verify against the PSF advisory at https://mail.python.org/archives/list/security-announce@python.org/thread/4FU62L2M6RMMHT2QPGQNPEHHUND7CEX5/. If upgrading is not immediately possible, the most effective compensating control is to avoid calling tarfile.extractall() on untrusted archives entirely and instead manually iterate members with tarfile.getmembers(), validating each resolved path against the intended destination before extracting. Alternatively, restrict the extracting process to a dedicated, low-privilege account and an isolated directory with no sensitive files in parent paths, limiting the blast radius of any successful traversal. Note that continuing to use data_filter alone is insufficient as a workaround since this vulnerability specifically bypasses it.

Affected VersionsENISA

CPython 0 <3.15.0

Affected Packages

euvd cpython fix: 3.15.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CPython's tarfile module (cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:*) introduced tarfile.data_filter as a security control to prevent path traversal during archive extraction. The vulnerability (CWE-22, Path Traversal) arises from multiple related flaws in how the filter validates link targets in the _get_filtered_attrs function within Lib/tarfile.py. First, the filter was resolving symlink targets relative to the original unstripped member name rather than the normalized form actually written to disk - a normpath/realpath divergence that could be exploited by chaining a pre-placed symlink to a deep nonexistent path while using normpath collapsing to escape the destination. Second, trailing separators on symlink member names (e.g., 'x/') caused target resolution to use the wrong parent directory. Third, link entries with empty, '.', or './' names could silently replace the destination directory itself with a symlink, redirecting all subsequent extractions. The PR diff shows the fix enforces normalization of linkname before validation, strips trailing separators from the member name when resolving the symlink directory, and explicitly raises OutsideDestinationError when a link target resolves to the destination directory itself.

Know when Cpython gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PSF) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Jun 04, 2026 - 16:22 NVD
6.9 (MEDIUM)
CVE Published
Jun 04, 2026 - 14:21 nvd
UNKNOWN (no severity yet)

DescriptionCVE.org

tarfile.data_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() to write files outside the destination directory, subject to the permissions of the extracting process.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

CVE-2026-17084 MEDIUM POC
6.0 Aug 18

Integrity bypass in CPython's stringprep module causes divergent domain name normalization when processing international

CVE-2026-19445 CRITICAL
9.2 Sep 30

A use-after-free in CPython's ssl module lets a remote, unauthenticated TLS client crash a Python TLS server process - o

CVE-2026-6100 CRITICAL
9.1 Apr 13

CPython decompression modules (lzma, bz2, gzip) allow memory corruption via use-after-free when decompressor instances a

CVE-2026-3298 HIGH
8.8 Apr 21

Out-of-bounds buffer write in CPython's asyncio.ProactorEventLoop (Windows only) allows remote attackers to trigger memo

CVE-2026-11972 HIGH
8.2 Jun 23

Denial of service in CPython's tarfile module allows remote attackers to trigger an infinite loop by supplying a crafted

CVE-2026-9669 HIGH
8.2 Jun 08

Stack-based buffer overflow in CPython's bz2.BZ2Decompressor allows remote attackers to crash Python applications by sen

CVE-2026-11940 HIGH
7.8 Jun 23

Path traversal in CPython's tarfile module allows a crafted tar archive to bypass the 'data' and 'tar' extraction filter

CVE-2026-19553 HIGH
7.6 Sep 30

Certificate hostname verification is silently skipped in CPython's TLS stack when an application enables SSLContext.chec

CVE-2026-4786 HIGH
7.0 Apr 13

Command injection in CPython's webbrowser.open() API bypasses previous CVE-2026-4519 mitigation via specially crafted UR

CVE-2026-4519 HIGH
7.0 Mar 20

The webbrowser.open() API in CPython accepts URLs with leading dashes, which certain web browsers interpret as command-l

CVE-2026-19672 MEDIUM
6.3 Aug 19

CPython's tarfile module on POSIX platforms creates empty directories outside the intended extraction destination when p

CVE-2026-7210 MEDIUM
6.3 May 11

XML parsers in CPython's xml.parsers.expat and xml.etree.ElementTree modules use insufficient entropy for Expat hash-flo

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected
SLES15-SP6-CHOST-BYOS-Azure Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy