Skip to main content

CPython EUVDEUVD-2026-40336

| CVE-2026-4360 LOW
Improper Preservation of Permissions (CWE-281)
2026-06-30 PSF GHSA-gf2w-jqmq-fcm8
2.0
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 malicious hardlinks
  2. Delivery
    Deliver archive to target system
  3. Exploit
    Privileged user extracts archive with filter='data'
  4. Execution
    Filter bypassed for hardlink members
  5. Impact
    Files written to disk with attacker-controlled uid/gid

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Permission preservation
Exploitation Conditions

Exploitation requires all of the following: (1) the target system runs an affected CPython version that implements the tarfile filter API (inferred to be Python 3.12.x or later); (2) application code calls tarfile.extract() or tarfile.extractall() with filter='data' explicitly, relying on this parameter for security hardening; (3) the tar archive being extracted originates from an untrusted source controlled by the attacker; (4) the archive contains at least one hardlink member with crafted uid/gid values; and (5) user interaction or operator action triggers the extraction (UI:P). Exploitation is further constrained by AT:P (specific preconditions must align) and PR:H as assessed in the CVSS 4.0 vector. The impact is strictly limited to incorrect uid/gid assignment on extracted hardlinks - no code execution, no data disclosure, and no availability impact are possible through this flaw alone.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:H/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N) and score of 2.0 collectively signal very low real-world risk. PR:H indicates the attacker must possess high privileges on the target - though from a pure attacker-craft-the-tarball perspective, the more limiting constraint is AT:P (specific attack preconditions) and UI:P (user interaction required to trigger extraction). The only impact is VI:L - a low-integrity write affecting uid/gid on hardlinked files; there is no confidentiality or availability impact. EPSS data is absent from available intelligence, so exploitation probability cannot be quantified. No KEV listing and no public POC exist, meaning this is not observed in active campaigns. The practical threat is narrow: an attacker must supply a crafted tar archive containing hardlinks, which must be extracted by a process relying on filter='data' for security assurance. The flaw undermines a security control rather than enabling direct system compromise, making it a correctness/trust issue rather than a high-urgency incident response priority. CVSS PR:H may overstate attacker privilege requirements if the attacker's role is solely delivering the malicious archive - this metric warrants verification against the vendor advisory.

Exploit ScenarioDerived

An attacker crafts a tar archive that contains one or more hardlinks with maliciously chosen uid/gid values and delivers it to a target system - via a file download, API upload, or artifact pipeline. A privileged process on that system calls tarfile.extract() with filter='data', expecting the filter to normalize file ownership to safe values. Because the filter is not propagated to the hardlink extraction path, the files are written to disk with the attacker-specified uid/gid, potentially creating files owned by an unintended system account. No public proof-of-concept is available at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 30, 2026

CPython's tarfile.extract() silently bypasses the 'filter' parameter when processing hardlinks within tar archives, writing files with attacker-controlled uid/gid values despite the caller specifying filter='data' for security. Systems that extract content from untrusted tar archives while relying on this filter mechanism for ownership hardening are left with unexpected file ownership on extracted hardlinks. No active exploitation has been confirmed (not in CISA KEV) and no public proof-of-concept is available at time of analysis; the CVSS 4.0 score of 2.0 reflects the narrow, low-impact nature of the flaw.

RemediationAI

Apply the upstream fix available in GitHub pull request https://github.com/python/cpython/pull/151988, reported and tracked in issue https://github.com/python/cpython/issues/151987. Patch availability is confirmed per the Python Software Foundation security announcement at https://mail.python.org/archives/list/security-announce@python.org/thread/TWZW2PC2AZOV6FENIHFSRC63OM7MBGSB/, but an exact released patched CPython version is not independently confirmed from available data - verify the fix version against the CPython changelog or release notes before deploying. As a compensating control prior to patching, applications processing untrusted tar archives should perform post-extraction validation of uid/gid on all extracted files including hardlinks, or preemptively reject tar members of type LNKTYPE from untrusted archives (note: this may break legitimate use cases that rely on hardlinks). Alternatively, restrict the sources of tar archives to trusted origins only.

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

CPython's tarfile module (CPE: cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:*) provides the tarfile.extract() and tarfile.extractall() interfaces for unpacking tar archives, including POSIX hardlinks. The filter parameter - introduced in Python 3.12 as a security mechanism - allows callers to specify sanitization policies such as filter='data', which is intended to strip dangerous attributes including absolute paths and enforce controlled uid/gid assignment. CWE-281 (Improper Preservation of Permissions) describes the root cause: the code path responsible for extracting hardlinks does not receive or apply the caller-supplied filter value, meaning the hardlink members in the archive bypass the permission/ownership normalization that the caller expects. The result is that uid/gid embedded in the untrusted tar archive are applied to the hardlinked file on disk, violating the security contract of the filter API.

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 2.0 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 3.1 LOW

Attacker supplies only a crafted tar file (PR:N); AC:H reflects the specific preconditions (filter='data' in use, hardlinks present); impact limited to low-integrity uid/gid misassignment (I:L).

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

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
High
User Interaction
Passive
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

In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected system that extracts content from untrusted tar files could end up writing files with an unexpected uid/gid despite the user passing filter='data' to the extract() function.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Ubiquitous
CPython is the reference Python interpreter, foundational to virtually all Python deployments worldwide.
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC 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 LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

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