# GHSA-g8c6-8fjj-2r4m: python-socketio Pickle RCE via Message Queue

## Summary

Remote code execution vulnerability in python-socketio through malicious pickle deserialization when using message queue backends (Redis, etc.) for multi-server deployments.

## Description

When Socket.IO servers are configured to use a message queue backend such as Redis for inter-server communication, messages are encoded using Python's `pickle` module. An attacker with access to the message queue can craft malicious pickle payloads that exploit Python's `__reduce__` method to execute arbitrary code during deserialization via `pickle.loads()`.

## Affected Versions

- python-socketio >= 0.8.0, < 5.14.0

## Fixed Version

- python-socketio >= 5.14.0

## Severity

- **CVSS Score**: 6.4 (Moderate)
- **CWE**: CWE-502 (Deserialization of Untrusted Data)

## Attack Vector

1. Attacker gains access to the Redis/message queue backend
2. Attacker crafts a malicious pickle payload with `__reduce__` method
3. Payload is published to the Socket.IO pub/sub channel
4. Socket.IO server deserializes the message using `pickle.loads()`
5. Arbitrary code executes in the server context

## Prerequisites

- Multi-server Socket.IO deployment using message queue (Redis, etc.)
- Attacker has access to publish messages to the message queue

## Fix Analysis

The fix in 5.14.0 removes `pickle` entirely and replaces it with JSON encoding for inter-server messaging.

## References

- Advisory: https://github.com/miguelgrinberg/python-socketio/security/advisories/GHSA-g8c6-8fjj-2r4m
- CVE: https://nvd.nist.gov/vuln/detail/CVE-2025-61765
