CVE-2026-42203 Details
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.
A server-side template injection vulnerability has been identified in LiteLLM, a proxy server for calling LLM APIs, versions 1.80.5 prior to 1.83.7. The vulnerability exists in the POST /prompts/test endpoint, which accepted user-supplied prompt templates and rendered them without proper sandboxing. This lack of isolation allowed crafted templates to execute arbitrary code within the LiteLLM Proxy process. The endpoint only requires a valid proxy API key for access, enabling any authenticated user to exploit the vulnerability. Depending on the proxy's deployment, this could lead to the exposure of sensitive information from the process environment, such as provider API keys or database credentials, and allow commands to be executed on the host.
The vulnerability has been patched in LiteLLM version 1.83.7. Users are advised to upgrade to this version or later. If an immediate upgrade is not possible, the POST /prompts/test endpoint can be blocked at the reverse proxy or API gateway, and a review and rotation of API keys that should not have access to prompt management routes is recommended.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2026-42203 | redhat-SADP | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2467917 | redhat-SADP | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42203.json | redhat-SADP | |
| https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable | [email protected] | ProductRelease Notes |
| https://github.com/BerriAI/litellm/security/advisories/GHSA-xqmj-j6mv-4862 | [email protected] | MitigationPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1336 | Improper Neutralization of Special Elements Used in a Template Engine | [email protected] |
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | redhat-SADP |
Affected Products
| Product | Versions |
|---|---|
| litellm litellm | >= 1.80.5, < 1.83.7 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 26, 2026 | CVE Translated | [email protected] |
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 13, 2026 | Initial Analysis | [email protected] |
| May 8, 2026 | New CVE Received | [email protected] |