CVE-2026-42203: LiteLLM: Server-Side Template Injection in /prompts/test endpoint

Published May 8, 2026
·
Updated

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 Software

2 affected components
LiteLLM LiteLLM>=1.80.5<1.83.7
LiteLLM LiteLLM>=1.80.5<1.83.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade LiteLLM Proxy to a version that resolves this vulnerability.

    Fixed in 1.83.7
  2. Configuration

    Ensure prompt template rendering in the /prompts/test endpoint is sandboxed; versions before 1.83.7 rendered user-supplied prompt templates without sandboxing.

    LiteLLM Proxy (/prompts/test endpoint) prompt template rendering sandboxing = enabled
  3. Compensating control

    Restrict network/access to the LiteLLM Proxy /prompts/test endpoint so only trusted users/services can reach it, since the endpoint only validates a valid proxy API key and authenticated users could access it.

Event History

May 8, 2026
CVE Published
via MITRE·03:36 AM
Data Sourced
via MITRE·03:36 AM
DescriptionWeakness
Data Sourced
via Red Hat·04:02 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42203?

CVE-2026-42203 has been classified as a high severity vulnerability due to the potential for server-side template injection.

2

How do I fix CVE-2026-42203?

To remediate CVE-2026-42203, upgrade LiteLLM to version 1.83.7 or later.

3

What systems are affected by CVE-2026-42203?

CVE-2026-42203 affects LiteLLM versions from 1.80.5 to before 1.83.7.

4

What is the impact of CVE-2026-42203?

The impact of CVE-2026-42203 includes the risk of attackers exploiting the vulnerability to execute arbitrary code on the server.

5

What is server-side template injection in CVE-2026-42203?

Server-side template injection in CVE-2026-42203 allows unauthorized users to submit malicious templates that the server processes, potentially leading to data leakage or remote code execution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203