Skip to main content

CPython CVE-2026-4360

| EUVDEUVD-2026-40336 LOW
Improper Preservation of Permissions (CWE-281)
2026-06-30 PSF GHSA-gf2w-jqmq-fcm8
2.0
CVSS 4.0 · Vendor: PSF

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
Privileges Required
High
User Interaction
P
Scope
X

Lifecycle Timeline

1
Analysis Generated
Jun 30, 2026 - 15:21 vuln.today

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.

AnalysisAI

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.

Technical ContextAI

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.

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.

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-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-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-7774 MEDIUM
6.9 Jun 04

Path traversal in CPython's tarfile module allows malicious tar archives to bypass the data_filter safety mechanism and

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

CVE-2026-3276 MEDIUM
6.3 Jun 03

Denial-of-service via quadratic algorithmic complexity in CPython's unicodedata.normalize() affects all CPython versions

Share

CVE-2026-4360 vulnerability details – vuln.today

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