← Back to Pull requests

fix(workers/rpc): authenticate RPC calls to stop unauthenticated pickle RCE #4153

Open
unknown opened this pull request with 146 lines diff across 1 files
View on GitHub
unknown unknown commented on Oct 18, 2026 02:21 UTC
Author

Security fix: unauthenticated pickle deserialization → RCE in the worker RPC transport

The RPC Pickled wire type (miles/utils/workers/rpc/...) calls pickle.loads on request bodies during pydantic validation, before any auth/state check. Any peer that can reach a worker's RPC port (default 8000) can POST a crafted body and achieve remote code execution as the training-worker process (which holds model weights, datasets and cluster/object-store credentials).

Exposed by default under --cluster-backend kubernetes (rpc is the only comm backend there); also under --cluster-backend ray --worker-comm-backend rpc.

Fix


Authenticate every RPC call with a per-run shared secret (x-miles-rpc-secret, delivered out of band), rejecting unauthenticated callers before any payload is decoded.

Verification


PoC reproduced in the sglang container against the real RPC app: a benign pickle payload executed at decode time (marker file created before the method body ran). Patch applies cleanly on main.

Reported by an oss-scanner-style audit; PoC uses localhost + benign payloads only.

🤖 Generated with Claude Code

Diff: 146 lines (+109 / -37) across 1 files Reviewer: claude[bot] Review duration: 2m
All Vouch review confidence checks passed
Residual risk 0.42 = Change Risk (0.56) × (1 − Review Confidence (0.25)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.56 · 146 lines diff across 1 files
0.56
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 57% · Reviewer familiarity: 35%
25%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.299
Sensitive Paths sensitive_paths
0.056
Real PR Conversation Timeline
1 comments
"Review active on #4153"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: medium confidence: 25.3% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 56% (MEDIUM) · Higher = larger blast radius
56%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 25.3% · Lower = rushed or shallow review
25.3%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 41.8% · Moderate risk
41.8%
Repository