CVE-2026-37004 LiteLLM vulnerable to server-side template injection in the /prompts/test endpoint

Critical 9.8 Published Updated

Unauthenticated attackers can execute arbitrary OS commands via Server-Side Template Injection in the LiteLLM library's prompt testing endpoint.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-37004?

CVE-2026-37004 is a critical code injection vulnerability in n/a, published on 27 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-1336

Which versions are affected by CVE-2026-37004?

3 open source packages ship an affected version, including litellm.

PackageAffectedFixed in
litellm PyPIAll versions1.83.7
litellm PyPIAll versions1.83.7
litellm PyPIAll versions1.83.7

How do I fix CVE-2026-37004?

Upgrade litellm to 1.83.7 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-37004 being exploited?

There is no known exploitation of CVE-2026-37004 in the wild and no public exploit code.

Sources

Also known as ECHO-a062-523f-e726, GHSA-6wvf-77m9-58rm, MINI-79gg-82x6-83mm, MINI-7mmg-h5fw-q8pf, MINI-9j6v-jprr-rjq9, MINI-qwhw-vf95-r25r and 3 more.

Is CVE-2026-37004 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free