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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | litellm | 1.83.7 | GHSA-xqmj-j6mv-4862 |
| PyPI | litellm | 1.83.7 | PYSEC-2026-2602 |
Affected products (as reported)
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
- https://github.com/BerriAI/litellm/security/advisories/GHSA-xqmj-j6mv-4862 x_refsource_CONFIRM
- https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable x_refsource_MISC
- https://access.redhat.com/security/cve/CVE-2026-42203 vdb-entry, x_refsource_REDHAT
- RHBZ#2467917 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42203.json x_sadp-csaf-vex