PoC Monitor
← All CVEs
CVE-2026-42271published 8 May 2026 03:35 UTCData: JSON · API

BerriAI LiteLLM

LiteLLM: Authenticated command execution via MCP stdio test endpoints

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.

First public PoC 12 daysafter publication · 20 May 2026
Public PoCs31 on GitHub · 2 Exploit-DB, Metasploit or nuclei
CVSS8.8high · scored by NVD · CWE-77
CISA KEV 8 Jun 202631 days after publication

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

BerriAI litellm
  • >= 1.74.2, < 1.83.7

Fixed in 1.83.7

Mitigation

Upgrade litellm to 1.83.7 or later.

References

Timeline

Days relative to CVE publication
t=0+7+14+21+28CVE published8 May 2026 · t = 0First public PoC20 May 2026 · t+12dAdded to CISA KEV8 Jun 2026 · t+31d

First public PoC 12 days after publication; added to CISA KEV 31 days after publication. First PoC: learner202649/CVE-2026-42271-PoC (created 20 May 2026, found by us: backfilled).

PoC repositories

Found on GitHub.

1 PoCs · 1 informational

PoCs 1
RepositoryCreatedStarsAssessment
learner202649/CVE-2026-42271-PoC 20 May 2026 +12 d 1 PoC
Informational 1
RepositoryCreatedStarsAssessment
HORKimhab/CVE-2026-42271 9 Jun 2026 +32 d 0 Informational · write-up

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.

PoC characteristics

What to hunt for in your logs · from 1 PoC repo

POST /mcp-rest/test/tools/list

Key headers
Authorization: Bearer sk-litellm-master-key
Content-Type
application/json
Ports
4000
Seen in
1 repo: learner202649/CVE-2026-42271-PoC
Evidence
learner202649/CVE-2026-42271-PoC/README.md:43 learner202649/CVE-2026-42271-PoC/README.md:155

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /mcp-rest/test/tools/list
(?i)^/mcp-rest/test/tools/list(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /mcp-rest/test/tools/list
alert http any any -> $HOME_NET [4000] (msg:"GG PoC-Monitor CVE-2026-42271 BerriAI litellm exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/mcp-rest/test/tools/list"; http.header; content:"Authorization: Bearer sk-litellm-master-key"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-42271; classtype:web-application-attack; sid:9587031; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /mcp-rest/test/tools/list
title: BerriAI litellm exploit attempt (CVE-2026-42271)
id: gg-pocmon-cve-2026-42271-9587031
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42271. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-42271
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/mcp-rest/test/tools/list'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.42271