elephas icon indicating copy to clipboard operation
elephas copied to clipboard

[Security] Unauthenticated RCE via Pickle Deserialization in Parameter Server (CWE-502)

Open xiaoyaoyou2 opened this issue 6 months ago • 0 comments

Summary

Unauthenticated Remote Code Execution via unsafe pickle.loads() on raw HTTP request body in the distributed Keras parameter server.

Affected Code

File: elephas/parameter/server.py:118

delta = pickle.loads(request.data)

The /update (POST) endpoint accepts raw pickle data from the HTTP request body with zero authentication.

Impact

CVSS 9.8 (Critical) — Complete server compromise. An unauthenticated attacker can execute arbitrary OS commands on the distributed training parameter server by sending a crafted pickle payload.

Root Cause

Python pickle is not safe against untrusted data. The server uses pickle.loads() directly on request.data without authentication, input validation, or HMAC verification.

Fix

Replace pickle with JSON serialization or add HMAC-based authentication before deserialization.

Responsible Disclosure

Private Vulnerability Reporting is not enabled on this repository. Please enable it (Settings → Code security → Private vulnerability reporting) for future reports. If you prefer to discuss privately: [email protected].

CC @maxpumperla

xiaoyaoyou2 avatar Jun 02 '26 23:06 xiaoyaoyou2