Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain valid proxy API key
-
DeliverySend crafted SSTI payload to POST /prompts/test
-
ExploitTemplate engine executes arbitrary Python code
-
ExecutionAccess process environment variables
-
PersistExfiltrate provider API keys and credentials
-
ImpactExecute system commands on proxy host
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Valid LiteLLM proxy API key for authentication (CVSS PR:L). The vulnerable POST /prompts/test endpoint must be network-accessible to the attacker (CVSS AV:N). The LiteLLM proxy must be running affected versions 1.80.5 through 1.83.6. No other special configuration or non-default settings are required-this endpoint is part of standard proxy deployment and does not need to be explicitly enabled. No user interaction required (CVSS UI:N). The authentication requirement is the primary limiting factor: attackers need credentials that may be distributed to multiple users in multi-tenant deployments, developers in testing environments, or third-party integrations. Organizations with tight API key controls and single-user proxy deployments face lower real-world risk than those with broadly distributed keys. Attack complexity is low (CVSS AC:L) once authentication is obtained-standard SSTI techniques apply without requiring deep application knowledge or timing attacks. |
| Impact | Real-world risk is high but not critical due to authentication requirement limiting attack surface. CVSS 8.6 reflects High severity with network attack vector (AV:N), low complexity (AC:L), and low privilege requirement (PR:L). The vector shows high confidentiality and integrity impact (VC:H/VI:H) with no availability impact (VA:N) and no scope change (SC:N/SI:N/SA:N), meaning attackers gain control within the proxy process but don't inherently pivot to other systems. EPSS data not provided, but GitHub security advisory publication significantly increases exploit probability as researchers and attackers now have detailed vulnerability information. Not currently in CISA KEV, indicating no confirmed mass exploitation campaigns, but the SSTI and RCE tags plus public advisory suggest proof-of-concept development is straightforward for attackers with template injection knowledge. Authentication requirement (PR:L) is the primary limiting factor-attackers need valid API keys, which may be broadly distributed in multi-user proxy deployments but restricts opportunistic scanning. Real priority depends on deployment model: high-risk for multi-tenant proxies with many key holders, moderate-risk for internal-only deployments with tight key management. The combination of simple exploitation (SSTI is well-understood), high impact (credential theft, command execution), and public disclosure makes this a genuine priority despite auth requirement. Patch availability in version 1.83.7 and workaround option (blocking endpoint at reverse proxy) provide clear remediation path. |
| Exploit ScenarioDerived | An authenticated attacker with a valid LiteLLM proxy API key crafts a malicious prompt template containing server-side template injection payloads (e.g., Jinja2 syntax accessing Python object internals like {{''.__class__.__mro__[1].__subclasses__()}}). They submit this payload to POST /prompts/test, which the proxy renders without sandboxing. The template engine evaluates the malicious code, allowing the attacker to execute arbitrary Python code within the proxy process. The attacker reads environment variables to exfiltrate API keys for OpenAI, Anthropic, or other LLM providers configured in the proxy, along with database credentials. They establish persistence by modifying proxy configuration or installing a reverse shell. Public GitHub advisory provides detailed vulnerability information that simplifies proof-of-concept development for attackers familiar with SSTI techniques. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 08, 2026
Server-side template injection in LiteLLM Proxy versions 1.80.5 through 1.83.6 allows authenticated users to execute arbitrary code via the POST /prompts/test endpoint. Any user with a valid proxy API key can submit malicious prompt templates that escape sandboxing and run commands in the proxy server process, exposing environment secrets like provider API keys and database credentials. This vulnerability affects deployments using LiteLLM as an AI gateway proxy server. No active exploitation confirmed (not in CISA KEV), but GitHub advisory and patch are publicly available, increasing exploit likelihood. CVSS 8.6 (High) with network attack vector and low complexity, though PR:L requirement limits exposure to authenticated attackers only.
RemediationAI
Upgrade to LiteLLM version 1.83.7-stable or later, which implements sandboxed template rendering that blocks dangerous object attribute access (confirmed fix at https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable). For Docker deployments, use ghcr.io/berriai/litellm:v1.83.7-stable and verify image signature with cosign using the public key at https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub per release documentation. If immediate upgrade is not feasible, implement two compensating controls: (1) Block POST requests to /prompts/test at your reverse proxy, API gateway, or web application firewall-this prevents all access to the vulnerable endpoint but disables legitimate prompt testing functionality for development teams; (2) Audit and rotate API keys to ensure only trusted users retain proxy access, then implement strict key management policies-this reduces attacker pool but doesn't eliminate risk if any key holder is compromised. Note that blocking the endpoint is the only workaround that fully mitigates the vulnerability; key rotation only reduces probability. Both workarounds should be temporary measures pending upgrade to 1.83.7.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
LiteLLM is a Python-based proxy server that provides a unified OpenAI-compatible API interface for multiple LLM providers. The vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) resides in the prompt template rendering functionality at the POST /prompts/test endpoint. This endpoint accepts user-provided template strings and renders them using a template engine without proper sandboxing. Template injection attacks exploit this by inserting special syntax (typically Jinja2 or similar Python template engine directives) that break out of the intended template context. In Python template engines, attackers can access internal object attributes like __class__.__mro__ to traverse the object hierarchy and reach dangerous functions like subprocess.Popen or os.system. The affected component is the pip package 'litellm' with CPE cpe:2.3:a:berriai:litellm covering versions 1.80.5 through 1.83.6. The vulnerability exists in the proxy server component specifically, not the core LiteLLM library used as a client.
Know when Litellm gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 1 pypi packages depend on litellm (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 1.80.5.
Executive ViewAI
LiteLLM Proxy versions 1.80.5 through 1.83.6 contain a server-side template injection vulnerability that allows authenticated users with valid API keys to execute arbitrary code on the proxy server, potentially exposing sensitive credentials including provider API keys and database passwords. Organizations using LiteLLM as an AI gateway must immediately audit API key distribution and restrict proxy access, as the attack requires only basic authentication but enables full system compromise.
Vendor-released patch: LiteLLM Proxy version 1.83.7 or later. If immediate upgrade is impossible, restrict network access to the POST /prompts/test endpoint to trusted internal systems only, disable or remove unused API keys, and implement strict monitoring for suspicious template syntax in proxy logs while patch deployment is scheduled.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in LiteLLM API Injection and Template Vulnerabilities
View all 3Authentication bypass in LiteLLM (BerriAI) proxy/AI Gateway before 1.84.0 lets a remote unauthenticated attacker reach M
BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the `/completions` endpoint. Rated critical s
Remote code execution in BerriAI LiteLLM (all versions through 2026-04-08) enables authenticated attackers to execute ar
BerriAI's litellm, in its latest version, is vulnerable to arbitrary file deletion due to improper input validation on t
Authentication bypass in the LiteLLM proxy lets any party who already holds a valid JWT issued by the configured externa
In berriai/litellm version v1.52.1, an issue in proxy_server.py causes the leakage of Langfuse API keys when an error oc
In berriai/litellm before version 1.44.12, the `litellm/litellm_core_utils/litellm_logging.py` file contains a vulnerabi
A Server-Side Request Forgery (SSRF) vulnerability exists in berriai/litellm version 1.38.10. Rated high severity (CVSS
An SQL Injection vulnerability exists in the berriai/litellm repository, specifically within the `/global/spend/logs` en
A code injection vulnerability exists in the berriai/litellm application, version 1.34.6, due to the use of unvalidated
EUVD-2026-28502
GHSA-xqmj-j6mv-4862
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB