Vulnerability · Published May 8, 2026 · Assigned by GitHub_M

CVE-2026-42203LiteLLM: Server-Side Template Injection in /prompts/test endpoint

High 8.8

In plain English

A high-severity code injection in litellm from BerriAI. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.8High
Exploit odds (30 days)0.4%top 68.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official description

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 packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIlitellm1.83.7GHSA-xqmj-j6mv-4862
PyPIlitellm1.83.7PYSEC-2026-2602

Affected products (as reported)

VendorProductVersions
BerriAI litellm >= 1.80.5, < 1.83.7

Weakness: CWE-1336, CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References