Description (CNA)
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.
Affected (CNA)
| Vendor / product | Versions |
|---|---|
| BerriAI / litellm | affected >= 1.80.5, < 1.83.7 |
CWE
CWE-1336
References
- https://github.com/BerriAI/litellm/security/advisories/GHSA-xqmj-j6mv-4862
- https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable
ADP enrichment
No English description supplied.
No references supplied.
A flaw was found in LiteLLM, an AI Gateway. An authenticated user could exploit this by sending a crafted prompt template to the POST /prompts/test endpoint. The endpoint rendered user-supplied prompt templates without proper sandboxing. This could lead to arbitrary code execution within the LiteLLM Proxy process, potentially exposing sensitive information such as API keys or database credentials, and allowing commands to be run on the host system.