[KEV] OS Command Injection in BerriAI LiteLLM (CVE-2026-42271)
Summary
OS command injection in BerriAI LiteLLM (CVE-2026-42271). Successful exploitation can lead to full system takeover. Exploitable via POST /mcp-rest/test/connection. Listed in CISA KEV — actively exploited. Mitigation: upgrade to 1.83.7 or later.
Original description
The description as published by the source.
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.74.2 to before version 1.83.7, two endpoints used to preview an MCP server before saving it — POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list — accepted a full server configuration in the request body, including the command, args, and env fields used by the stdio transport. When called with a stdio configuration, the endpoints attempted to connect, which spawned the supplied command as a subprocess on the proxy host with the privileges of the proxy process. The endpoints were gated only by a valid proxy API key, with no role check. Any authenticated user — including holders of low-privilege internal-user keys — could therefore run arbitrary commands on the host. This issue has been patched in version 1.83.7.
Source: NIST National Vulnerability Database NVD GitHub Advisory CISA KEV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-42271 has been found in BerriAI LiteLLM.
Attackers can target a specific entry point like POST /mcp-rest/test/connection over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 8.8/10.
Note: CISA has officially confirmed this is actively exploited in the wild. Treat it with elevated urgency.
What to do: upgrade BerriAI LiteLLM to 1.83.7 or later.
If unsure, ask your IT team or search "BerriAI LiteLLM CVE-2026-42271" on the vendor's site.
CVE-2026-42271 (BerriAI LiteLLM) — CWE-78 / CVSS v3 8.8
Attack vector: remote (network-reachable) / no user interaction
Attack surface: POST /mcp-rest/test/connection / POST /mcp-rest/test/tools/list / command / args
Patched: 1.83.7 — apply immediately
Listed in CISA KEV — actively exploited, treat as top priority.
Workaround: If upgrading is not immediately possible, developers should block POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list at their reverse proxy or API gateway.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
OS command injection (CWE-78) exists in BerriAI LiteLLM. Attackers reach the vulnerable code path via POST /mcp-rest/test/connection.
Check the vendor advisory for the affected versions of BerriAI LiteLLM. Attack surface: POST /mcp-rest/test/connection / POST /mcp-rest/test/tools/list / command / args.
Severity: High (CVSS 8.8/10). Successful exploitation can lead to full system takeover. Listed in CISA KEV — actively exploited in the wild, treat as top priority.
Update to 1.83.7.
Workaround: If upgrading is not immediately possible, developers should block POST /mcp-rest/test/connection and POST /mcp-rest/test/tools/list at their reverse proxy or API gateway.
Search webserver/proxy logs for unusual POST /mcp-rest/test/connection requests with malformed payloads or SQL meta-characters. Run grep -r 'litellm' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'litellm' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
litellmを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'POST /mcp-rest/test/connection' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
POST /mcp-rest/test/connectionへの異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Consider incident declaration escalate
Notify SOC / on-callCISA KEV登録済 = 実環境で悪用が観測されている。Step 2 で兆候があればインシデント対応宣言、無くてもパッチ適用までWAF強化を最優先で。
-
4Apply temporary workaround mitigate
If upgrading is not immediately possible, developers should block `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` at their reverse proxy or API gateway.パッチが適用されるまでの応急処置として、If upgrading is not immediately possible, developers should block
POST /mcp-rest/test/connectionandPOST /mcp-rest/test/tools/listat their reverse proxy or API gateway. を実施。回避策の副作用 (機能低下) を確認した上で。 -
5Apply patch patch
Upgrade BerriAI LiteLLM to 1.83.7ステージング環境で 1.83.7 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
6Post-deployment verification verify
Replay attack against POST /mcp-rest/test/connection on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
References
- advisory github.com
- advisory nvd.nist.gov
- advisory access.redhat.com
- advisory access.redhat.com
- advisory access.redhat.com
- advisory access.redhat.com
- advisory github.com
- package github.com
- report bugzilla.redhat.com
- web github.com
- web github.com
- web cisa.gov
- web security.access.redhat.com