CVE-2026-42203
published high CVSS 4.0 · 8.6LiteLLM: Server-Side Template Injection in /prompts/test endpoint
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| BerriAI | — | litellm>= 1.80.5, < 1.83.7 | Affected | Not stated | GitHub_M |
| Red Hat | — | exploit-intelligence-tech-preview/vulnerability-analysis-rhel9Exploit Intelligence | Unaffected | Not required | redhat-SADP |
| Red Hat | — | ansible-automation-platform-26/lightspeed-chatbot-rhel9Red Hat Ansible Automation Platform 2 | Affected | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-llama-stack-core-rhel9Red Hat OpenShift AI (RHOAI) | Unaffected | Not required | redhat-SADP |
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 flaw was found in LiteLLM, an AI Gateway. An authenticated user could exploit this by sending a crafted prompt template to the POST /prompts/test endpoint. The endpoint rendered user-supplied prompt templates without proper sandboxing. This could lead to arbitrary code execution within the LiteLLM Proxy process, potentially exposing sensitive information such as API keys or database credentials, and allowing commands to be run on the host system.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.6 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.8 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| BerriAI | litellm | >= 1.80.5, < 1.83.7 (affected) | GitHub_M · cna |
| Red Hat | Exploit Intelligence | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Ansible Automation Platform 2 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unaffected | redhat-SADP · adp |
Weaknesses
2- CWE-1336 CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
5- https://access.redhat.com/security/cve/CVE-2026-42203
- RHBZ#2467917 https://bugzilla.redhat.com/show_bug.cgi?id=2467917
- https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable
- https://github.com/BerriAI/litellm/security/advisories/GHSA-xqmj-j6mv-4862
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42203.json
Provider assertions
3GitHub_M · cna
LiteLLM: Server-Side Template Injection in /prompts/test endpoint
redhat-SADP · adp
litellm: LiteLLM: Arbitrary code execution via unsandboxed prompt templates
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 1a052b965fca1c3d4b2b2af188fa87282c41946caf2853251047dca7d6b2d72c
- Ingested
- 23 Sep 2026, 09:14:00 UTC
- Source record
- Official CVE record