CVE-2025-61765
Python vulnerability analysis and mitigation

Overview

CVE-2025-61765 is a remote code execution (RCE) vulnerability in python-socketio caused by unsafe deserialization of inter-server messages using Python's pickle module. It affects python-socketio versions >= 0.8.0 and < 5.14.0 in multi-server deployments that use a message queue backend (e.g., Redis, RabbitMQ, Kafka, ZeroMQ) for inter-server communication. The vulnerability was disclosed on October 3, 2025 by researcher locus-x64 and published to the NVD on October 6, 2025. It carries a CVSS v3.1 base score of 6.4 (Medium) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is CWE-502 (Deserialization of Untrusted Data): python-socketio serialized inter-server messages using Python's pickle module and deserialized them with pickle.loads() upon receipt, implicitly trusting all messages arriving via the message queue. An attacker who has already gained access to the message queue (e.g., Redis channel) can publish a crafted pickle payload that exploits Python's __reduce__ method to execute arbitrary code during deserialization. The vulnerability affects multiple manager backends including redis_manager.py, async_redis_manager.py, kombu_manager.py, kafka_manager.py, zmq_manager.py, and their async counterparts. The fix (commit 53f6be0) replaces all pickle.dumps()/pickle.loads() calls with JSON encoding/decoding across all affected manager modules (GitHub Advisory, Patch Commit).

Impact

Successful exploitation allows an attacker to execute arbitrary Python code with the same privileges as the Socket.IO server process, potentially leading to full server compromise, data exfiltration, and lateral movement within the infrastructure. Confidentiality and integrity impacts are rated High, while availability impact is Low. The attack is limited to multi-server deployments where the message queue has been compromised; single-server deployments and those with properly secured message queues are not affected (GitHub Advisory, Red Hat Bugzilla).

Exploitation steps

  1. Prerequisite — Gain message queue access: Obtain write access to the message queue backend (e.g., Redis, RabbitMQ, Kafka) used by the target multi-server python-socketio deployment. This may be achieved through credential theft, network misconfiguration, or exploitation of a separate vulnerability in the queue service.
  2. Identify the channel: Determine the Socket.IO pub/sub channel name used for inter-server communication (default is typically socketio).
  3. Craft a malicious pickle payload: Create a Python pickle payload that exploits the __reduce__ method to execute arbitrary OS commands upon deserialization. Example:
import pickle, os
class Exploit(object):
    def __reduce__(self):
        return (os.system, ('id > /tmp/pwned',))
payload = pickle.dumps(Exploit())
  1. Publish the payload: Publish the raw pickle bytes to the target message queue channel (e.g., using redis-cli PUBLISH socketio <payload> or equivalent for other backends).
  2. Trigger deserialization: When a python-socketio server reads the message from the queue, it calls pickle.loads() on the received bytes, executing the embedded command with the privileges of the server process.
  3. Achieve objectives: Use the code execution to establish persistence, exfiltrate data, or pivot to other systems within the infrastructure (GitHub Advisory, Red Hat Bugzilla).

Indicators of compromise

  • Network: Unexpected or unauthorized connections to the message queue (e.g., Redis on port 6379) from external or untrusted IP addresses; unusual PUBLISH commands to the Socket.IO channel observed in message queue logs.
  • Logs: Message queue access logs showing PUBLISH commands to the socketio channel from unexpected clients; python-socketio server logs showing deserialization errors or unexpected method calls from inter-server messages.
  • Process: Unusual child processes spawned by the python-socketio server process (e.g., sh, bash, curl, wget, python) that are not part of normal application behavior.
  • File System: Unexpected files created in world-writable directories (e.g., /tmp/) by the server process; new cron jobs, scripts, or binaries created under the application user's home directory.

Mitigation and workarounds

The primary remediation is to upgrade python-socketio to version 5.14.0 or later, which replaces pickle serialization with JSON encoding for all inter-server messaging backends. As a workaround for deployments that cannot immediately upgrade, strictly enforce access controls on the message queue: restrict queue listeners to localhost for single-node deployments, use a private VPC network for multi-node deployments, enable authentication on the message queue, and apply network-level firewall rules to prevent unauthorized access. Regularly audit message queue access logs for anomalous activity (GitHub Advisory, Patch Commit).

Community reactions

The vulnerability was discovered and reported by researcher locus-x64 and published by the maintainer (miguelgrinberg) via a GitHub Security Advisory on October 3, 2025. BlueRock published a blog post detailing the discovery, titled "CVE-2025-61765: BlueRock Discovers Critical RCE in Socket.IO Ecosystem," which received attention on Hacker News. The vulnerability was also covered by The Hacker News in a weekly threat bulletin. Linux distribution vendors including SUSE and Fedora issued package update advisories, and security scanners from Qualys and Tenable added detection support (BlueRock Blog, GitHub Advisory, SUSE Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-hmj8-5xmh-5573HIGH7.5
  • Python logoPython
  • libp2p
NoNoJul 24, 2026
GHSA-94p4-4cq8-9g67HIGH7.5
  • Python logoPython
  • gitpython
NoYesJul 24, 2026
GHSA-47w6-gwp4-w6vcHIGH7.1
  • Python logoPython
  • vantage6
NoNoJul 24, 2026
CVE-2026-59714HIGH7.1
  • Python logoPython
  • open-webui
NoYesJul 24, 2026
GHSA-464c-974j-9xm6LOW3.3
  • JavaScript logoJavaScript
  • software.amazon.awscdk:aws-cdk-lib
NoYesJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management