Skip to main content

Cpython CVE-2026-6100

| EUVDEUVD-2026-22028 CRITICAL
Use After Free (CWE-416)
2026-04-13 PSF
9.1
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

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

  1. Access
    Identify memory-constrained Python service
  2. Delivery
    Send compressed payload to network endpoint
  3. Exploit
    Induce parallel memory pressure
  4. Execution
    Trigger MemoryError in reused decompressor
  5. Persist
    Send second payload
  6. Impact
    Exploit dangling pointer for code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

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

Exploitation Conditions

Requires all four conditions: (1) Python application uses stateful decompressor classes (lzma.LZMADecompressor, bz2.BZ2Decompressor, or gzip.GzipFile) rather than one-shot helper functions. (2) Application explicitly reuses decompressor instances across multiple decompression operations rather than creating fresh instances per operation. (3) Application catches MemoryError exceptions in error handling logic and continues execution rather than terminating the workflow. (4) System operates under memory pressure sufficient to trigger allocation failures during decompression-either pre-existing resource constraints or attacker-induced memory exhaustion. Exploitation is LIMITED by high attack complexity (CVSS AC:H), requirement for present attack techniques (AT:P), and the narrow window between MemoryError and reuse. Applications using default one-shot decompress() functions or fail-fast error handling are NOT vulnerable despite running affected CPython versions. Network accessibility (AV:N) and no authentication requirement (PR:N) broaden attack surface, but no user interaction needed (UI:N) for network-exposed services.

Impact

Despite CVSS 9.1 critical rating, real-world risk is LOW to MODERATE for most deployments. EPSS score of 0.05% (16th percentile) indicates security researchers assess exploitation probability as very low. SSVC framework confirms no active exploitation, not automatable, but total technical impact (arbitrary code execution). The high CVSS reflects worst-case scenario: network-accessible RCE with confidentiality/integrity impact. However, exploitation requires four simultaneous conditions: (1) network exposure of Python service processing untrusted compressed data, (2) system under memory pressure to trigger MemoryError, (3) application code that catches MemoryError exceptions and continues execution, (4) deliberate reuse of the same decompressor instance. Most Python applications either use one-shot decompress() functions (not vulnerable) or fail-fast on MemoryError (no reuse). Containerized microservices with tight memory limits represent the highest-risk deployment pattern. CRITICAL CAVEAT: CVSS 4.0 vector shows AV:N but description requires attacker to both control compressed input AND trigger memory exhaustion timing-verify whether memory pressure can be attacker-induced or requires pre-existing system load. No public exploit code identified at time of analysis. Patch available but upgrade urgency depends on deployment pattern verification.

Exploit ScenarioDerived

Attacker sends specially crafted compressed payload to network-accessible Python web service (e.g., API endpoint accepting gzip-encoded requests) running in memory-constrained container. Simultaneously, attacker floods service with parallel requests to exhaust available memory. When target application attempts to decompress malicious payload using reused BZ2Decompressor instance, memory allocation fails with MemoryError, leaving dangling pointer. Application's error handling catches exception and reuses same decompressor for next request. Attacker's second payload triggers use-after-free, corrupting memory to achieve code execution as the Python process user. Public exploit code not identified at time of analysis, but exploitation complexity is high (AC:H) due to precise timing requirements.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv2 – Apr 17, 2026

CPython decompression modules (lzma, bz2, gzip) allow memory corruption via use-after-free when decompressor instances are reused after MemoryError exceptions under memory pressure. Affects all CPython versions before 3.15.0. Exploitation requires network-accessible Python service that decompresses attacker-controlled data, operates under memory constraints, and reuses decompressor objects across multiple operations-a narrow but realistic scenario in containerized environments or resource-limited systems. No active exploitation confirmed (EPSS 0.05%, not in CISA KEV). Patch available via CPython 3.15.0.

Earlier versions of this analysis (1)
v1 Apr 15, 2026 - 12:31 CVSS 9.1

Memory corruption in CPython's lzma, bz2, and gzip decompressors allows remote attackers to potentially achieve confidentiality and integrity compromise when decompressor instances are reused after MemoryError exceptions under memory pressure conditions. The use-after-free occurs in versions prior to 3.15.0 when programs violate recommended usage patterns by reusing decompressor objects across calls after allocation failures. Despite CVSS 9.1, real-world risk is limited: EPSS shows only 5% exploitation probability (16th percentile), no active exploitation confirmed (not in CISA KEV), SSVC rates it non-automatable with no current exploitation, and the attack requires high complexity (AC:H) with precise attack timing (AT:P). Python Software Foundation released patches in commits 6a5f79c, 8fc66ae, c3cf71c addressing all three affected modules.

RemediationAI

Upgrade to CPython 3.15.0 or later, which includes fixes in commits 6a5f79c8d7, 8fc66aef6d, c3cf71c336, 47128e64f9, and e20c6c9667. For environments unable to upgrade immediately, implement these compensating controls with noted trade-offs: (1) Replace stateful decompressor instances with one-shot helper functions like lzma.decompress()-eliminates vulnerability but may increase memory overhead for large datasets by creating new instances per operation. (2) Implement strict error handling that terminates decompression workflows on MemoryError rather than catching and continuing-prevents reuse but reduces service resilience under load. (3) Deploy memory limits and monitoring to prevent MemoryError conditions entirely-reduces attack surface but may cause legitimate operations to fail. (4) For containerized deployments, allocate sufficient memory overhead (recommendation: 150% of expected peak decompression working set) to avoid memory pressure scenarios-increases resource costs. None of these mitigations provide complete protection; upgrade remains the definitive solution. Verify fix deployment via python --version and review application code for decompressor reuse patterns.

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

This is a use-after-free (CWE-416) in CPython's C implementation of decompression libraries. When lzma.LZMADecompressor, bz2.BZ2Decompressor, or gzip.GzipFile encounter memory allocation failures during decompression operations, they raise MemoryError but fail to clean up internal pointers to freed memory. If the application catches this exception and reuses the same decompressor instance for subsequent operations, the dangling pointer can be exploited for arbitrary memory corruption. The vulnerability exists in the stateful decompressor classes but NOT in one-shot helper functions (lzma.decompress(), bz2.decompress(), gzip.decompress(), zlib.decompress()) which create fresh instances per call. Affects CPython versions prior to 3.15.0 across all platforms. The CVSS 4.0 vector indicates network attack vector with high attack complexity (AC:H) and present attack technique (AT:P), reflecting the narrow exploitation window requiring memory pressure conditions. The fix (commits 6a5f79c, 8fc66ae, c3cf71c) adds cleanup logic to null out dangling pointers in error paths.

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 9.1 CRITICAL
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat 8.1 HIGH

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

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

Lifecycle Timeline

2
Patch released
Apr 13, 2026 - 18:00 nvd
Patch available
CVE Published
Apr 13, 2026 - 17:15 nvd
CRITICAL 9.1

DescriptionCVE.org

Use-after-free (UAF) was possible in the lzma.LZMADecompressor, bz2.BZ2Decompressor, and gzip.GzipFile when a memory allocation fails with a MemoryError and the decompression instance is re-used. This scenario can be triggered if the process is under memory pressure. The fix cleans up the dangling pointer in this specific error condition.

The vulnerability is only present if the program re-uses decompressor instances across multiple decompression calls even after a MemoryError is raised during decompression. Using the helper functions to one-shot decompress data such as lzma.decompress(), bz2.decompress(), gzip.decompress(), and zlib.decompress() are not affected as a new decompressor instance is used per call. If the decompressor instance is not re-used after an error condition, this usage is similarly not vulnerable.

Executive ViewAI

Why It Matters

CPython versions before 3.15.0 contain a use-after-free vulnerability in decompression modules (lzma, bz2, gzip) that can lead to memory corruption when decompressor objects are reused after memory allocation failures. Organizations running Python-based services that decompress untrusted network data in memory-constrained environments (containers, serverless platforms) face potential code execution risk. Patching to CPython 3.15.0 is required to eliminate this attack vector.

Business Impact: High
Compensating Controls

Vendor-released patch: CPython 3.15.0. Interim mitigations if upgrade delayed: (1) Implement strict memory limits above critical thresholds to prevent MemoryError triggering; (2) Avoid reusing decompressor object instances-create new instances for each decompression operation; (3) Restrict network input to trusted sources only; (4) Run Python services in isolated containers with memory caps and crash recovery.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment 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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

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

Vendor StatusVendor

SUSE

Severity: High
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Fixed
SLES15-SP6-CHOST-BYOS Fixed
SLES15-SP6-CHOST-BYOS-Aliyun Fixed
SLES15-SP6-CHOST-BYOS-Azure Fixed
SLES15-SP6-CHOST-BYOS-EC2 Fixed

References

Advisories & patches
PATCH https://github.com/python/cpython/commit/6a5f79c8d7bbf22b083b240910c7a8781a59437d PATCH https://github.com/python/cpython/commit/8fc66aef6d7b3ae58f43f5c66f9366cc8cbbfcd2 PATCH https://github.com/python/cpython/commit/c3cf71c3366fe49acb776a639405c0eea6169c20 PATCH https://github.com/python/cpython/pull/148396 ADVISORY https://mail.python.org/archives/list/security-announce@python.org/thread/HTWB2Z6KT5QQX4RYEZAFININDHNOSIF3/ ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-6100 ADVISORY https://ubuntu.com/security/notices/USN-8509-1 ADVISORY https://vuldb.com/vuln/357209 REF http://www.openwall.com/lists/oss-security/2026/04/13/10 REF https://access.redhat.com/errata/RHSA-2026:10117 REF https://access.redhat.com/errata/RHSA-2026:10140 REF https://access.redhat.com/errata/RHSA-2026:10141 REF https://access.redhat.com/errata/RHSA-2026:10711 REF https://access.redhat.com/errata/RHSA-2026:10745 REF https://access.redhat.com/errata/RHSA-2026:10774 REF https://access.redhat.com/errata/RHSA-2026:10949 REF https://access.redhat.com/errata/RHSA-2026:10950 REF https://access.redhat.com/errata/RHSA-2026:11062 REF https://access.redhat.com/errata/RHSA-2026:11077 REF https://access.redhat.com/errata/RHSA-2026:11768 REF https://access.redhat.com/errata/RHSA-2026:13692 REF https://access.redhat.com/errata/RHSA-2026:13812 REF https://access.redhat.com/errata/RHSA-2026:14652 REF https://access.redhat.com/errata/RHSA-2026:14653 REF https://access.redhat.com/errata/RHSA-2026:14656 REF https://access.redhat.com/errata/RHSA-2026:16699 REF https://access.redhat.com/errata/RHSA-2026:17525 REF https://access.redhat.com/errata/RHSA-2026:17619 REF https://access.redhat.com/errata/RHSA-2026:19019 REF https://access.redhat.com/errata/RHSA-2026:19064 REF https://access.redhat.com/errata/RHSA-2026:19175 REF https://access.redhat.com/errata/RHSA-2026:19176 REF https://access.redhat.com/errata/RHSA-2026:19177 REF https://access.redhat.com/errata/RHSA-2026:19216 REF https://access.redhat.com/errata/RHSA-2026:19549 REF https://access.redhat.com/errata/RHSA-2026:19570 REF https://access.redhat.com/errata/RHSA-2026:19571 REF https://access.redhat.com/errata/RHSA-2026:19576 REF https://access.redhat.com/errata/RHSA-2026:19590 REF https://access.redhat.com/errata/RHSA-2026:21275 REF https://access.redhat.com/errata/RHSA-2026:21682 REF https://access.redhat.com/errata/RHSA-2026:25096 REF https://access.redhat.com/errata/RHSA-2026:26187 REF https://access.redhat.com/errata/RHSA-2026:30078 REF https://access.redhat.com/errata/RHSA-2026:30087 REF https://access.redhat.com/errata/RHSA-2026:30088 REF https://access.redhat.com/errata/RHSA-2026:30089 REF https://access.redhat.com/errata/RHSA-2026:52400 REF https://access.redhat.com/errata/RHSA-2026:8822 REF https://access.redhat.com/errata/RHSA-2026:8824 REF https://access.redhat.com/errata/RHSA-2026:9228 REF https://access.redhat.com/security/cve/CVE-2026-6100 REF https://bugzilla.redhat.com/show_bug.cgi?id=2457932 REF https://github.com/python/cpython/commit/47128e64f98c3a20271138a98c2922bea2a3ee0e REF https://github.com/python/cpython/commit/e20c6c9667c99ecaab96e1a2b3767082841ffc8b REF https://github.com/python/cpython/commit/ea8d735eb084cf8cc021df1a30e90d10a8f052e3 REF https://github.com/python/cpython/issues/148395 REF https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-6100.json

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