CVE-2025-61765: Python socketio Remote Code Execution Vulnerability
MODERATECVE-2025-61765 is a MODERATE (CVSS 6.4) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Python socketio libraries in the PyPI ecosystem. The issue involves python-socketio vulnerable to arbitrary python code execution (rce) through malicious pickle deserialization in certain multi-server deployments. Remediation is available by upgrading affected packages to version 5.14.0.
CVE-2025-61765 at a Glance
Security Impact
CVSS: 6.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L).
How to Fix CVE-2025-61765
To remediate this vulnerability, upgrade all affected Python socketio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install python-socketio>=5.14.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show python-socketio
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-61765, inspect your installed packages using pip:
pip show python-socketio
Analyze the terminal output to locate any version of Python socketio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.14.0), your application is affected.
Note: The pip show python-socketio command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Python socketio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-61765 Affected Python socketio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
python-socketio
|
PyPI |
≥ 0.8.0
< 5.14.0
|
5.14.0
|
References
Frequently Asked Questions
What is CVE-2025-61765?
Which Python socketio versions are affected?
What version fixes CVE-2025-61765?
Is python-socketio affected?
What is the CVSS score of CVE-2025-61765?
What CWE is associated with CVE-2025-61765?
How can I check PyPI dependencies for CVE-2025-61765?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g8c6-8fjj-2r4m",
"modified" : "2025-10-22T17:15:11Z",
"published" : "2025-10-07T12:55:22Z",
"aliases" : [ "CVE-2025-61765" ],
"summary" : "python-socketio vulnerable to arbitrary Python code execution (RCE) through malicious pickle deserialization in certain multi-server deployments",
"details" : "### Summary\nA remote code execution vulnerability in python-socketio versions prior to 5.14.0 allows attackers to execute arbitrary Python code through malicious pickle deserialization in multi-server deployments on which the attacker previously gained access to the message queue that the servers use for internal communications.\n\n### Details\nWhen Socket.IO servers are configured to use a message queue backend such as Redis for inter-server communication, messages sent between the servers are encoded using the `pickle` Python module. When a server receives one of these messages through the message queue, it assumes it is trusted and immediately deserializes it.\n\nThe vulnerability stems from deserialization of messages using Python's `pickle.loads()` function. Having previously obtained access to the message queue, the attacker can send a python-socketio server a crafted pickle payload that executes arbitrary code during deserialization via Python's `__reduce__` method.\n\n### Impact\nThis vulnerability only affects deployments with a compromised message queue. The attack can lead to the attacker executing random code in the context of, and with the privileges of a Socket.IO server process. \n\nSingle-server systems that do not use a message queue, and multi-server systems with a secure message queue are not vulnerable.\n\n### Remediation\nIn addition to making sure standard security practices are followed in the deployment of the message queue, users of the python-socketio package can upgrade to version 5.14.0 or newer, which remove the `pickle` module and use the much safer JSON encoding for inter-server messaging.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "python-socketio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.0"
}, {
"fixed" : "5.14.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/miguelgrinberg/python-socketio/security/advisories/GHSA-g8c6-8fjj-2r4m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-61765"
}, {
"type" : "WEB",
"url" : "https://github.com/miguelgrinberg/python-socketio/commit/53f6be094257ed81476b0e212c8cddd6d06ca39a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/miguelgrinberg/python-socketio"
}, {
"type" : "WEB",
"url" : "https://www.bluerock.io/post/cve-2025-61765-bluerock-discovers-critical-rce-in-socket-io-ecosystem"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-502" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-10-07T12:55:22Z",
"nvd_published_at" : "2025-10-06T16:15:35Z"
}
}