Add LiteLLM MCP test endpoint command execution exploit (CVE-2026-42271) #21585
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 325 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
Diff Size
diff_size
0.346
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #21585"
general
weight: 0.35
kenlacroix
Overview
Adds an exploit module for CVE-2026-42271, a command execution flaw in the
BerriAI LiteLLM proxy's MCP "test" REST endpoints
(GHSA-v4p8-mg3p-g94g, on the
CISA KEV list).
POST /mcp-rest/test/connectionandPOST /mcp-rest/test/tools/listaccept afull MCP server configuration in the request body. When
transportisstdio,LiteLLM spawns the supplied
command/argsas a subprocess on the proxy host.On affected versions (1.74.2–1.83.6) both endpoints are gated only by
user_api_key_authand the command is unrestricted, so any valid virtual key —including a low-privilege, non-admin key — yields command execution as the proxy
process.
1.83.7fixed it with two controls, both confirmed in the lab:PROXY_ADMINrole check on both endpoints (non-admin → HTTP 403), anddeno, docker, node, npx, python, python3, uvx),so
/bin/shis rejected with HTTP 422 regardless of role.The module sends
command=/bin/sh,args=["-c", <payload>]. Execution is blind(the spawned process is not an MCP server, so the endpoint returns a connection
error after the command runs), so a callback payload is used.
checkis side-effect-free: it prefers the/healthversion banner, then fallsback to probing the command allowlist with a non-existent command path — a
patched build returns 422 before any spawn, a vulnerable build returns a generic
connection error (the missing binary never executes).
Verification
Lab:
litellm/litellm:main-v1.83.3-stable(vulnerable) andmain-v1.83.7-stable(patched), each DB-backed, with a non-admin virtual keyminted via
/key/generate.ruby -cpasses; module loads inmsfconsolecheckreturns Appears against 1.83.3 and Safe against 1.83.7(true positive + true negative, same non-admin key)
runwithcmd/unix/reverse_bashreturns a session asuid=0(root)against 1.83.3
runagainst 1.83.7 fails cleanly (HTTP 422, command allowlist)Note: the master key is
PROXY_ADMIN, so the module expects a non-adminAPIKEY— that is the privilege boundary the CVE describes.