GHSA-xqmj-j6mv-4862

Suggest an improvement
Source
https://github.com/advisories/GHSA-xqmj-j6mv-4862
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-xqmj-j6mv-4862/GHSA-xqmj-j6mv-4862.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-xqmj-j6mv-4862
Aliases
  • CVE-2026-42203
Downstream
Related
Published
2026-04-24T16:02:42Z
Modified
2026-05-12T17:16:34.099538Z
Severity
  • 8.6 (High) CVSS_V4 - 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 CVSS Calculator
Summary
LiteLLM: Server-Side Template Injection in /prompts/test endpoint
Details

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.
Database specific
{
    "github_reviewed": true,
    "severity": "HIGH",
    "nvd_published_at": "2026-05-08T04:16:19Z",
    "cwe_ids": [
        "CWE-1336"
    ],
    "github_reviewed_at": "2026-04-24T16:02:42Z"
}
References

Affected packages

PyPI / litellm

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.80.5
Fixed
1.83.7

Affected versions

1.*
1.80.5
1.80.6
1.80.7
1.80.8
1.80.9
1.80.10
1.80.11
1.80.12
1.80.13
1.80.15
1.80.16
1.80.17
1.81.0
1.81.1
1.81.3
1.81.4
1.81.5
1.81.6
1.81.7
1.81.8
1.81.9.dev1
1.81.9
1.81.10
1.81.11
1.81.12
1.81.13
1.81.14
1.81.15
1.81.16
1.82.0
1.82.1
1.82.2
1.82.3
1.82.4
1.82.5
1.82.6
1.83.0
1.83.1
1.83.2
1.83.3
1.83.4
1.83.5
1.83.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-xqmj-j6mv-4862/GHSA-xqmj-j6mv-4862.json"