CVE-2026-37004

Server‑Side Template Injection in BerriAI litellm Enables Remote Code Execution

Published Aug 27, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

BerriAI litellm versions up to 1.82.4 are vulnerable to Server‑Side Template Injection caused by an unsandboxed Jinja2 environment. An attacker can supply a crafted dotprompt_content parameter to the /prompts/test endpoint, which is evaluated as a Jinja2 template. This evaluation leads to the execution of arbitrary operating‑system commands, giving the attacker full control over the service host.

Affected Systems

The affected product is BerriAI litellm, with all releases up to and including version 1.82.4 impacted. Any deployment of these versions that has not applied a fix remains vulnerable.

Risk and Exploitability

The CVSS score is 9.8 and the EPSS score is less than 1 %. While the exploitation probability is low, the impact of successful exploitation is catastrophic: remote code execution without authentication. The vulnerability is accessed via a reachable HTTP endpoint, and no KEV listing indicates it has not yet been widely exploited in the wild, but the flaw’s severity warrants urgent remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade BerriAI litellm to a version newer than 1.82.4 as soon as the vendor releases a patch
  • Disable or protect the /prompts/test endpoint by requiring authentication or restricting access
  • Configure Jinja2 to use a sandboxed environment or sanitize input before rendering to prevent template execution

Generated by OpenCVE AI on September 1, 2026 at 00:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6wvf-77m9-58rm LiteLLM vulnerable to server-side template injection in the /prompts/test endpoint
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Server‑Side Template Injection in BerriAI litellm Enables Remote Code Execution
Type Values Removed Values Added
Title Litellm SSTI Vulnerability Enabling Unauthenticated Remote Code Execution
Weaknesses CWE-94
Type Values Removed Values Added
Weaknesses CWE-1336
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Title Litellm SSTI Vulnerability Enabling Unauthenticated Remote Code Execution
Weaknesses CWE-94
Type Values Removed Values Added
First Time appeared Berriai
Berriai litellm
Vendors & Products Berriai
Berriai litellm
Type Values Removed Values Added
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.
References
Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Sep 1, 2026, 3:56 AM
Reserved
Apr 6, 2026, 12:00 AM
Status
Deferred
Published
Aug 27, 2026, 8:17 PM
Modified
Sep 1, 2026, 4:18 AM