CVE-2026-42208: BerriAI LiteLLM SQL Injection Vulnerability
BerriAI LiteLLM contains a SQL injection vulnerability that allows an attacker to read data from the proxy's database and potentially modify it, leading to unauthorized access to the proxy and the credentials it manages.
Other sources
Impact A database query used during proxy API key checks mixed the caller-supplied key value into the query text instead of passing it as a separate parameter. An unauthenticated attacker could send a specially crafted Authorization header to any LLM API route (for example POST /chat/completions) and reach this query through the proxy's error-handling path.
An attacker could read data from the proxy's database and may be able to modify it, leading to unauthorised access to the proxy and the credentials it manages.
Patches Fixed in 1.83.7. The caller-supplied value is now always passed to the database as a separate parameter. Upgrade to 1.83.7 or later.
Workarounds If upgrading is not immediately possible, set disableerrorlogs: true under generalsettings. This removes the path through which unauthenticated input reaches the vulnerable query.
References Patched release: v1.83.7-stable Discovery Credit: Tencent YunDing Security Lab
— Red Hat
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. From version 1.81.16 to before version 1.83.7, a database query used during proxy API key checks mixed the caller-supplied key value into the query text instead of passing it as a separate parameter. An unauthenticated attacker could send a specially crafted Authorization header to any LLM API route (for example POST /chat/completions) and reach this query through the proxy's error-handling path. An attacker could read data from the proxy's database and may be able to modify it, leading to unauthorised access to the proxy and the credentials it manages. This issue has been patched in version 1.83.7.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
BerriAI LiteLLMto a version that resolves this vulnerability.Fixed in 1.83.7 - Configuration
If upgrading is not immediately possible, set disable_error_logs: true under general_settings.
LiteLLM general_settings disable_error_logs = true
Event History
Frequently Asked Questions
What is the severity of CVE-2026-42208?
CVE-2026-42208 is considered a critical vulnerability due to its potential for SQL injection impacting API key verification.
How do I fix CVE-2026-42208?
To mitigate CVE-2026-42208, upgrade LiteLLM to version 1.83.7 or later.
Which versions of LiteLLM are affected by CVE-2026-42208?
LiteLLM versions from 1.81.16 to before 1.83.7 are affected by CVE-2026-42208.
What type of vulnerability is CVE-2026-42208?
CVE-2026-42208 is an SQL injection vulnerability that occurs during proxy API key verification.
What are the potential impacts of CVE-2026-42208?
CVE-2026-42208 could allow an attacker to execute arbitrary SQL queries, potentially compromising the database.