ZeroHour

CVE-2026-37004

large

Unauthenticated RCE via Server-Side Template Injection in BerriAI LiteLLM

CVSS 3.1
9.8 critical
EPSS
<1%p44
Published
()
Modified
AI analysis

BerriAI LiteLLM versions up to and including 1.82.4 contain a server-side template injection (SSTI) flaw in the /prompts/test endpoint of the LiteLLM proxy, caused by rendering user-supplied input with an unsandboxed jinja2.Environment. An unauthenticated remote attacker can trigger it by sending a crafted dotprompt_content parameter to that endpoint, which is evaluated as a Jinja2 template. Because the template environment is unsandboxed, evaluation escapes into the underlying system and lets the attacker execute arbitrary OS commands on the host running the proxy. Any deployment running LiteLLM 1.82.4 or earlier is affected, with highest risk on proxy instances reachable over the network without authentication; CVSS 9.8 reflects full server compromise with high confidentiality, integrity, and availability impact. Exploitation has not been observed: there is no public proof-of-concept, the flaw is not in CISA KEV, and EPSS assigns a 0.5% probability of exploitation within 30 days.

What to do: Upgrade LiteLLM to a release newer than 1.82.4 as soon as a patched version is available, prioritizing any proxy instance reachable by unauthenticated users. As interim mitigation, restrict network access to the /prompts/test endpoint (or the whole proxy) and avoid passing untrusted dotprompt_content input. Check access logs for requests to /prompts/test containing dotprompt_content parameters and review hosts for signs of unexpected command execution.

Affected
BerriAI LiteLLM (pip package; proxy /prompts/test endpoint)<= 1.82.4
Estimated exposure
largeorder of ~10,000-100,000 LiteLLM proxy deployments, with only a fraction expected to be internet-exposed (estimate; exact exposed count unknown) — LiteLLM is one of the most widely adopted self-hosted open-source LLM gateways (very high monthly PyPI download volume and broad enterprise use), but it is most often deployed on internal networks and many pip downloads are SDK usage…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

BerriAI litellm <=1.82.4 is vulnerable to Server-Side Template Injection (SSTI), which allows unauthenticated remote attackers to execute arbitrary OS commands via a crafted dotprompt_content parameter in the /prompts/test endpoint due to use of an unsandboxed jinja2.Environment.

Ecosystems
pip
Weakness
CWE-1336
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA
GHSA-6wvf-77m9-58rm (critical)

In the news

No ingested article mentions this CVE yet.