CVE-2026-37004 is a critical-severity (CVSS 9.8) CWE-1336 vulnerability in litellm. A fix is available for litellm — see the affected versions and patch details below.
LiteLLM vulnerable to server-side template injection in the /prompts/test endpoint
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-37004.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
litellmReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
BerriAI litellm <=1.82.4 is vulnerable to Server-Side Template Injection (SSTI), which allows unauthenticated remote attackers to execute arbitrary OS commands via a crafted dotprompt_content parameter in the /prompts/test endpoint due to use of an unsandboxed jinja2.Environment.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | litellm | all versions | 1.83.7pip install --upgrade 'litellm==1.83.7' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for litellm, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update litellm to 1.83.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-37004 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated as Critical severity because unauthenticated remote attackers can execute arbitrary code on the underlying host with the privileges of the application process, requiring no user interaction or prior credentials. In environments where the proxy interface is directly exposed to untrusted…
Limit exposure by restricting network access to the litellm service to localhost or trusted internal networks, or configure an upstream reverse proxy or ingress controller to block requests directed to the `/prompts/test` path. If restricting service access to a trusted subnet using firewalld (for example, service port 4000 and trusted network 192.168.1.0/24): ``` firewall-cmd --permanent --zone=drop --add-port=4000/tcp firewall-cmd --permanent --zone=trusted --add-source=192.168.1.0/24 firewall-cmd --reload ``` If utilizing an upstream reverse proxy (such as Nginx), block requests targeting the vulnerable endpoint: ``` location = /prompts/test { return 403; } ``` Warning: Reloading…Source: Red Hat security advisory for CVE-2026-37004 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Exploit Intelligence 3.1 | exploit-intelligence/vulnerability-analysis-rhel9:1794542867 | RHSA-2026:102223 |
Frequently Asked Questions
Is CVE-2026-37004 in your dependencies?
Find it across PyPI, including transitive dependencies.