{"id":"CVE-2026-42203","aliases":["CVE-2026-42203","GHSA-xqmj-j6mv-4862","PYSEC-2026-2602"],"related":[],"kind":"vulnerability","state":"published","title":"LiteLLM: Server-Side Template Injection in /prompts/test endpoint","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe `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.\n\nThe 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.\n\nProxy deployments running an affected version are in scope.\n\n### Patches\nThe 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.\n\nLiteLLM recommends upgrading to `1.83.7-stable` or later.\n\n### Workarounds\nIf upgrading is not immediately possible:\n\n1. Block `POST /prompts/test` at your reverse proxy or API gateway.\n2. Review and rotate API keys that should not have access to prompt management routes.","format":"markdown","source":"ghsa"},{"lang":"es","text":"LiteLLM es un servidor proxy (Gateway de IA) para llamar a las API de LLM en formato OpenAI (o nativo). Desde la versión 1.80.5 hasta antes de la versión 1.83.7, el endpoint POST /prompts/test aceptaba plantillas de prompt proporcionadas por el usuario y las renderizaba sin sandboxing. Una plantilla manipulada podría ejecutar código arbitrario dentro del proceso del Proxy de LiteLLM. El endpoint solo verifica que el llamador presente una clave API de proxy válida, por lo que cualquier usuario autenticado podría alcanzarlo. Dependiendo de cómo se despliegue el proxy, esto podría exponer secretos en el entorno del proceso (como claves API de proveedor o credenciales de base de datos) y permitir que se ejecuten comandos en el host. Este problema ha sido parcheado en la versión 1.83.7.","source":"nvd"}],"published":"2026-04-24T16:02:42.000Z","modified":"2026-10-26T20:10:00.160Z","severity":{"scorer":"GitHub_M","scheme":"CVSS: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","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS: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","score":8.6,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS: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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS: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"}],"cwes":["CWE-94","CWE-1336"],"affected":[{"ranges":[{"version":">= 1.80.5, < 1.83.7","status":"affected"}],"vendor":"BerriAI","product":"litellm","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Exploit Intelligence","package":"exploit-intelligence-tech-preview/vulnerability-analysis-rhel9","cpe":"cpe:/a:redhat:exploit_intelligence:0","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-26/lightspeed-chatbot-rhel9","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-llama-stack-core-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.80.5","status":"affected","fixed":"1.83.7"}],"ecosystem":"PyPI","package":"litellm","purl":"pkg:pypi/litellm","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.80.5","fixed":"1.83.7"}],"vendor":"litellm","product":"litellm","cpe":"cpe:2.3:a:litellm:litellm:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"1.80.5","status":"affected","fixed":"1.83.7"}],"ecosystem":"PyPI","package":"litellm","purl":"pkg:pypi/litellm","source":"pysec"}],"references":[{"url":"https://github.com/BerriAI/litellm/security/advisories/GHSA-xqmj-j6mv-4862","tags":["mitigation","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-42203","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2467917","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42203.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42203","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/BerriAI/litellm","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/litellm","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-xqmj-j6mv-4862","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-08T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42203","url":"https://www.cve.org/CVERecord?id=CVE-2026-42203","licence":"CVE Terms of Use","modified":"2026-07-15T00:58:06.313Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xqmj-j6mv-4862","url":"https://github.com/advisories/GHSA-xqmj-j6mv-4862","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:45.007Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42203","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42203","licence":"Public domain","modified":"2026-10-26T20:10:00.160Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2602","url":"https://osv.dev/vulnerability/PYSEC-2026-2602","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:04.546Z"}],"updatedAt":"2026-11-25T22:59:20.946Z","epss":{"score":0.00373,"percentile":0.33339,"date":"2026-12-01T12:00:22.000Z"}}