Skip to main content

CPython tarfile EUVDEUVD-2026-133109

| CVE-2026-107784 MEDIUM
Path Traversal (CWE-22)
2026-11-23 PSF GHSA-jgcj-v5rv-rwh7
6.3
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

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

  1. Access
    Deliver crafted tar archive to victim
  2. Exploit
    Windows app extracts with tar/data filter to relative destination
  3. Execution
    Drive-relative member (e.g. 'C:foo') bypasses join and escapes destination
  4. Impact
    File written to drive CWD or symlink points outside target 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 ALL of the following: (1) the target runs on Windows, where drive-relative paths like 'C:foo' exist; (2) the application extracts an attacker-supplied tar archive using tarfile's 'tar' or 'data' extraction filter; (3) extraction targets a RELATIVE destination (one with no drive letter, or a different drive than the member) - the description specifies that os.path.join ignores such a destination for a drive-relative member; and (4) the malicious member name or symlink/hardlink target carries a drive but no root (e.g. 'C:escaped.evil', 'x/../C:escaped.evil', or './C:evil' for links). Limiting factors: the issue does not affect non-Windows platforms at all, does not apply when the destination path includes the matching drive, and yields only integrity impact (a file written to the drive's current working directory, or a symlink pointing outside the destination) - no confidentiality or availability impact. The victim application must choose to extract untrusted archives with these filters.

Impact

This is a moderate-severity path-traversal weakness (CWE-22) in CPython's tarfile 'tar' and 'data' extraction filters, scoped narrowly to Windows. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N, score 6.3) indicates a network-delivered but condition-dependent issue: AT:P reflects that successful exploitation requires a specific setup (a Windows host extracting to a relative destination), and impact is limited to integrity (VI:L) with no confidentiality or availability loss and no scope change (SC:N/SI:N). No EPSS score was provided, the CVE is not listed in CISA KEV, and no verified exploit code is supplied - the two references are the fix PR and the tracking issue, so there is no public exploit identified at time of analysis. The vuln.today priority is 'this_month' (not act_now/emergency), consistent with a real but non-urgent, defense-in-depth style fix in a very widely deployed library rather than an actively exploited emergency. Net: a genuine hardening priority for Windows-based tooling that ingests untrusted tar archives, but not a high-real-risk, drop-everything item. Note the limitation explicitly: the flaw manifests ONLY on Windows and ONLY when the extraction destination is relative - on a destination carrying a drive letter the drive-relative member does not escape.

Exploit ScenarioDerived

An attacker supplies a crafted tar archive whose member name or symlink target uses a drive-relative form such as 'C:escaped.evil' (a drive but no root). When a Windows application extracts it with the 'tar' or 'data' filter to a relative destination directory, os.path.join ignores the drive-less destination and the member is written to the current working directory of that drive - outside the intended destination - or a symlink is created pointing outside it. No verified public exploit code is provided; only the fix PR and issue are referenced.

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

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

Alert me

AnalysisAIv1 – Nov 23, 2026

On Windows, CPython's tarfile 'tar' and 'data' extraction filters fail to reject archive member names and link targets that carry a drive letter but no root, such as 'C:foo'. Because os.path.join() discards a destination lacking that drive, extracting into a relative destination writes the file into the current working directory of that drive, and a symlink or hardlink with such a target can point outside the intended directory - an integrity-only escape, since no confidentiality or availability impact is assessed (CVSS 3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N). Scope is narrow: the target must run on Windows, the application must extract an attacker-supplied tar using these filters, the destination must be drive-relative or on a different drive, and the member name or link target must be drive-relative; non-Windows platforms are not affected. Vendor-released fix code exists via upstream PR, and no public exploit code was identified at time of analysis.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed. The correction is in CPython PR 161334 (tracking issue 161323) and is flagged for inclusion in the next maintenance releases, so apply the vendor's patched builds for your Python branch as soon as they are published and rebuild or redeploy any bundled interpreter; the advisory pages are https://github.com/python/cpython/pull/161334 and https://github.com/python/cpython/issues/161323. Where patched CPython is not yet deployed, the specific compensating control is to avoid the vulnerable code path: do not set extraction_filter to 'tar' or 'data' while extracting untrusted archives on Windows, or wrap the filter with a custom callable that rejects members and link targets where ntpath.splitdrive() returns a non-empty drive - the trade-off is that the wrapper must be applied to both member names and normalized linknames for symlink and hardlink entries, and it must be re-audited on interpreter upgrades. As a secondary containment, extract only into an absolute destination whose drive matches the archives being processed, since the flaw does not apply when the destination carries the same drive, at the cost of constraining deployment layouts; extraction on non-Windows hosts requires no change.

Affected VersionsENISA

CPython 0 <3.16.0

Affected Packages

euvd cpython fix: 3.16.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

The affected code is tarfile's extraction filter machinery, which hardens archive extraction against path traversal (CWE-22) by validating each member before it is written. The filters previously rejected absolute paths with os.path.isabs(), which catches 'C:/foo' on Windows but not drive-relative forms like 'C:foo' - a Win32 path semantic in which the path is relative to the current directory of the named drive. On such input, ntpath.join() with a destination that has no drive, or a different drive, returns the member path unchanged, so the extraction target resolves outside the destination tree; the same logic gap applied to link targets, where only os.path.isabs(member.linkname) was checked. The upstream patch (PR 161334, issue 161323) changes _get_filtered_attrs() to raise AbsolutePathError when os.path.isabs(name) or os.path.splitdrive(name)[0] is non-empty, and raises AbsoluteLinkError against the normalized link target using the same isabs/splitdrive pair. Documentation for both filters is updated with a versionchanged note stating that drive-relative names and link targets are now refused, and the accompanying tests exercise the check on all platforms by substituting ntpath for os.path, plus a Windows-only test that confirms 'C:escaped.evil' no longer lands in the current working directory. The precise trigger conditions beyond the drive-relative member form are as described in the advisory; no additional parsing or archive-format weakness is documented.

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.3 MEDIUM
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
vuln.today AI 3.7 LOW

AC:H because exploitation needs Windows plus a relative (drive-less) extraction destination; PR:N/UI:N since the ingesting app extracts automatically; only integrity is affected (I:L), no C or A.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

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

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.5%
Top 54% exploitable
Prevalence
Ubiquitous
tarfile is a CPython standard-library module; CPython is deployed nearly everywhere
Data Quality
5 sources
Confidence: Medium

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.5%
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· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
High

Priority Score

33
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
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-115557 CRITICAL
9.4 Oct 24

CPython's ssl module validates TLS certificate chains that anchor to known-compromised eMudhra CA certificates, so anyon

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-119170 HIGH
8.2 Nov 06

FIPS algorithm enforcement in CPython 3.14.10's hashlib module can fail for hash requests made with usedforsecurity=True

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

Vendor StatusVendor

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