highVulnerability

GHSA-xqmj-j6mv-4862

### Impact 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. Proxy deployments running an affected version are in scope. ### Patches The issue is fixed in **`1.83.7-stable`**. The fix switches the prompt template renderer to a sandboxed environment that blocks the attributes this attack relies on. LiteLLM recommends upgrading to `1.83.7-stable` or later. ### Workarounds If upgrading is not immediately possible: 1. Block `POST /prompts/test` at your reverse proxy or API gateway. 2. Review and rotate API keys that should not have access to prompt management routes.

Properties

ghsa_id
GHSA-xqmj-j6mv-4862
summary
LiteLLM: Server-Side Template Injection in /prompts/test endpoint
severity
high
cve_id
GHSA-xqmj-j6mv-4862
is_ghsa_only
true
ghsa_published
2026-04-24T16:02:42Z
source_url
https://github.com/advisories/GHSA-xqmj-j6mv-4862
ghsa_updated
2026-04-24T16:02:42Z

Related Entities (4)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]pip/litellm

AFFECTS (1)

[Software]pip/litellm

HAS_WEAKNESS (1)

[Weakness]Improper Neutralization of Special Elements Used in a Template Engine

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-xqmj-j6mv-4862 — Ninja Signal Threat Intelligence | Ninja Signal