{"id":"CVE-2026-42203","published":"2026-05-08T03:36:58Z","modified":"2026-07-15T00:58:06Z","title":"LiteLLM: Server-Side Template Injection in /prompts/test endpoint","vendor":"BerriAI","product":"litellm","tier":"tail","description":{"text":"LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.80.5 to before version 1.83.7, 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. This issue has been patched in version 1.83.7.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.6,"severity":"HIGH","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00664,"percentile":0.4667,"provenance":"source"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/BerriAI/litellm/security/advisories/GHSA-xqmj-j6mv-4862","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-42203","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2467917","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42203.json","tags":["x_sadp-csaf-vex"]}],"priority":{"score":15.4,"factors":[{"name":"EPSS percentile","points":9.33},{"name":"CVSS severity","points":6.02}]},"vendorSlug":"berriai","affectedVersions":[{"vendor":"BerriAI","product":"litellm","versions":[">= 1.80.5, < 1.83.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-05-08T00:00:00+00:00","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"litellm","vulnerableRanges":[">=1.80.5, <1.83.7"],"patched":["1.83.7"],"from":["GHSA-xqmj-j6mv-4862","PYSEC-2026-2602"],"provenance":"source"}],"summary":{"text":"LiteLLM, the AI Gateway proxy server from BerriAI, has a server-side template injection flaw in its POST /prompts/test endpoint, which renders user-supplied prompt templates without sandboxing in versions from 1.80.5 up to but not including 1.83.7. An attacker who holds a valid proxy API key, which is the only check the endpoint performs, can submit a crafted template to run arbitrary code inside the LiteLLM Proxy process, potentially reading secrets from its environment or running commands on the host depending on the deployment.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:45:45Z"},"euvd":{"id":"EUVD-2026-28502","exploited":false,"provenance":"source"}}