BerriAI LiteLLM
LiteLLM: Server-Side Template Injection in /prompts/test endpoint
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.80.5 to before version 1.83.7, the POST /prompts/test endpoint accepted user-supplied prompt templates and rendered them without sandboxing. A crafted template could run arbitrary code inside the LiteLLM Proxy process. The endpoint only checks that the caller presents a valid proxy API key, so any authenticated user could reach it. Depending on how the proxy is deployed, this could expose secrets in the process environment (such as provider API keys or database credentials) and allow commands to be run on the host. This issue has been patched in version 1.83.7.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.80.5, < 1.83.7
Fixed in 1.83.7
Mitigation
Upgrade litellm to 1.83.7 or later.
References
- Vendor advisory github.com/BerriAI/litellm/security/advisories…
- Release notes github.com/BerriAI/litellm/releases/tag/v1.83.…
Timeline
Days relative to CVE publicationFirst public PoC 7.5 days after publication; not in CISA KEV. First PoC: Astianjy/CVE-2026-42203 (created 15 May 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Astianjy/CVE-2026-42203 | 15 May 2026 +7.5 d | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /prompts/test
- Key headers
Authorization: Bearer {var}- Content-Type
application/json- Ports
- 4000
- Seen in
- 1 repo: Astianjy/CVE-2026-42203
- Evidence
- Astianjy/CVE-2026-42203/CVE_2026_42203.py:85
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/prompts/test(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [4000] (msg:"GG PoC-Monitor CVE-2026-42203 BerriAI litellm exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/prompts/test"; http.header; content:"Authorization: Bearer "; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-42203; classtype:web-application-attack; sid:9300903; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: BerriAI litellm exploit attempt (CVE-2026-42203)
id: gg-pocmon-cve-2026-42203-9300903
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-42203. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-42203
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/prompts/test'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.42203