漏洞描述
LiteLLM proxy through 1.82.4 renders the user-supplied dotprompt_content of the POST /prompts/test endpoint with an unsandboxed jinja2 Environment. On a proxy started without a master key the endpoint is reachable unauthenticated, so a remote attacker can inject a jinja2 template that reaches os.popen through the template globals and execute arbitrary OS commands as the proxy user. Rendering happens before the downstream LLM call, so execution does not depend on a working model.
影响产品
修复建议
建议关注厂商安全公告,及时升级至已修复版本,并结合实际资产暴露情况采取缓解措施。
参考链接
github.comhttps://github.com/BerriAI/litellm/security/advisories/GHSA-6wvf-77m9-58rm↗github.comhttps://github.com/BerriAI/litellm/commit/d910a95661fce3cdd36f3b06c03ecf9c46c6457c↗github.comhttps://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable↗nvd.nist.govhttps://nvd.nist.gov/vuln/detail/CVE-2026-37004↗