CVE-2025-61765: Verified Repro With Script Download
CVE-2025-61765: python-socketio: Pickle Deserialization RCE in PubSub Manager
CVE-2025-61765 is verified against python-socketio · pip. Affected versions: >= 0.8.0, < 5.14.0. Fixed in 5.14.0. Vulnerability class: RCE. This medium reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00061.
What Is CVE-2025-61765?
CVE-2025-61765 is a medium-severity (CVSS 6.4) pickle deserialization RCE vulnerability (CWE-502) in python-socketio's pubsub manager, exploitable when an attacker can inject messages into the underlying message queue. Pruva reproduced it (reproduction REPRO-2026-00061).
CVE-2025-61765 Severity & CVSS Score
CVE-2025-61765 is rated medium severity, with a CVSS base score of 6.4 out of 10.
Medium — meaningful risk under specific conditions. Schedule a fix in the normal cycle.
Affected python-socketio Versions
python-socketio · pip versions >= 0.8.0, < 5.14.0 are affected.
How to Reproduce CVE-2025-61765
pruva-verify REPRO-2026-00061 curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00061/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh Proof of Reproduction for CVE-2025-61765
Root Cause and Exploit Chain for CVE-2025-61765
Summary
- Vulnerability: Pickle deserialization RCE in python-socketio pubsub manager
- Affected: python-socketio >= 0.8.0, < 5.14.0 (confirmed on 5.13.0)
- Fixed: 5.14.0 and later
- Impact: Remote code execution when attacker can inject messages into message queue
Mechanism (What is broken)
- In python-socketio's pubsub managers (RedisManager, KombuManager, etc.), inter-server messages are serialized using Python's
picklemodule. - The
_listen()method in the pubsub manager callspickle.loads(message['data'])on incoming messages from the message queue. - Python's pickle module executes arbitrary code via the
__reduce__method during deserialization, allowing an attacker who can inject messages into the queue to achieve RCE. - The vulnerable code pattern:
data = pickle.loads(message['data'])with no validation of message source or content.
Proof of Vulnerability
- On python-socketio 5.13.0, crafting a pickle payload with a malicious
__reduce__method that callsos.system()achieves code execution. - When the payload is deserialized via
pickle.loads(), the__reduce__method executesos.system("echo 'RCE' > /tmp/evidence.txt"). - Evidence captured in logs/evidence_vuln.txt showing file creation proves RCE.
- Evidence JSON: {"reproduced": true, "vulnerable_version": "5.13.0"}
Patched Behavior (Latest)
- In python-socketio 5.14.0, the developers replaced
picklewithjsonfor message queue communications (PR #1502). - The patched code uses
json.loads(message['data'].decode())instead ofpickle.loads(). - JSON deserialization does not support code execution - attempting to deserialize the pickle payload fails with a UTF-8 decode error.
- Our script records patched_blocked = true with mechanism "json_decode_error".
Bypass Exploration (10+ distinct attempts) We tested the following bypass attempts on the patched version:
- Raw pickle payload - Result: BLOCKED (UTF-8 decode error)
- Base64-encoded pickle - Result: BLOCKED (JSON parse error)
- JSON with reduce key - Result: BLOCKED (no code execution in JSON)
- JSON with constructor pattern - Result: BLOCKED (JSON doesn't support constructors)
- Nested pickle in JSON string - Result: BLOCKED (string not deserialized)
- Unicode escape sequences - Result: BLOCKED (no code path to eval)
- JSON with class key - Result: BLOCKED (not a Python object hook)
- Msgpack payload - Result: BLOCKED (not accepted by json.loads)
- YAML-in-JSON injection - Result: BLOCKED (pure JSON parser)
- Polyglot JSON/pickle - Result: BLOCKED (JSON parser strict mode)
Result: All bypass attempts blocked because JSON deserialization fundamentally does not support code execution. patched_all_blocked=true.
Threat Model Considerations
- Access: Attacker needs ability to publish messages to the message queue backend (Redis, RabbitMQ, Kombu, etc.)
- Gain: Full RCE within the Socket.IO server process context and privilege level
- Prerequisites: Multi-server Socket.IO deployment using a message queue for inter-server communication
- In single-server deployments, this vulnerability is not exploitable as there is no message queue
How to Interpret Our Artifacts
- logs/evidence_vuln.txt: Shows "RCE_EXECUTED_VIA_PICKLE" written via os.system(), proving code execution
- logs/vulnerable.log: Shows pickle.loads() successfully deserializing and executing the malicious payload
- logs/patched.log: Shows json.loads() rejecting the pickle payload with decode error
- logs/result.json: JSON summary with reproduced=true, patched_blocked=true
Conclusion
- Vulnerability reproduced on affected version (5.13.0) with concrete file-write evidence via pickle deserialization
- Patched version (5.14.0) completely blocks the attack by switching to JSON serialization
- The fix is comprehensive: 10 bypass attempts all failed because JSON fundamentally cannot execute code during parsing
References
CVE-2025-61765 Reproduction Transcript
The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.
Loading session...
Artifacts and Evidence for CVE-2025-61765
Scripts, logs, diffs, and output captured during the reproduction.
No artifacts available
How to Fix CVE-2025-61765
Upgrade python-socketio · pip to 5.14.0 or later.
FAQ: CVE-2025-61765
How does the CVE-2025-61765 pickle deserialization RCE work?
__reduce__ method calls os.system() (or equivalent). Because pickle.loads() executes __reduce__ during deserialization, the injected message triggers arbitrary code execution as soon as _listen() processes it — reproduced by having a malicious __reduce__ write proof-of-execution to a file.Which python-socketio versions are affected by CVE-2025-61765, and where is it fixed?
How severe is CVE-2025-61765?
How can I reproduce CVE-2025-61765?
References for CVE-2025-61765
Authoritative sources for CVE-2025-61765 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.