CVE-2025-61765: Python socketio Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-g8c6-8fjj-2r4m
CVSS 6.4
CWE-502
Published
Advisory Summary

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

CVE Identifier CVE-2025-61765
GHSA Identifier GHSA-g8c6-8fjj-2r4m
Severity MODERATE
CVSS v3.1 Base Score 6.4
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Python socketio
Package Ecosystem PyPI
Published Date
Last Updated

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

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (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.

python-socketio fixed: 5.14.0
pip install python-socketio>=5.14.0
Verify Direct and Transitive Dependencies

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

### Summary A 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. ### Details When 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. The 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. ### Impact This 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. Single-server systems that do not use a message queue, and multi-server systems with a secure message queue are not vulnerable. ### Remediation In 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.

CVE-2025-61765 Affected Python socketio Versions

1 component(s)
Fixed Versions:
5.14.0
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?
CVE-2025-61765 is a security vulnerability in Python socketio involving python-socketio vulnerable to arbitrary Python code execution (RCE) through malicious pickle deserialization in certain multi-server deployments under CWE-502: Deserialization of Untrusted Data.
Which Python socketio versions are affected?
Affected versions include releases prior to 5.14.0 across affected packages: python-socketio.
What version fixes CVE-2025-61765?
Upgrading to 5.14.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is python-socketio affected?
Yes, python-socketio is affected in releases prior to 5.14.0. Upgrade your dependency to 5.14.0 or later.
What is the CVSS score of CVE-2025-61765?
CVE-2025-61765 has a CVSS v3.1 base score of 6.4 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2025-61765?
CVE-2025-61765 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2025-61765?
Run the dependency tree command: 'pip show python-socketio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}