Security Bulletin

CVE-2026-42208: Pre-Authentication SQL Injection in LiteLLM Exposes API Credentials

6 min read

A critical vulnerability in LiteLLM is turning AI infrastructure into an open vault; no login required.  Tracked as CVE-2026-42208, this vulnerability allows attackers to extract API keys, cloud credentials, and provider authentication tokens without any credentials or prior access to the system.

The root cause is fundamental lapse in input handling. LiteLLM’s API key validation blindly injects the Bearer token from the Authorization header into a SQL query without sanitization.

This exploitation began within 36 hours of public disclosure, leaving limited time for organizations to respond.

What is CVE-2026-42208?

Risk Assessment

Severity: Critical
CVSS Score: 9.3
Vector: Network-based, pre-authentication
Exploit Availability: Yes
Exploit Complexity: Low

CVE-2026-42208 is a SQL injection vulnerability in LiteLLM caused by unsafe handling of input during API key verification.

LiteLLM, a popular open-source AI gateway with over 22,000 GitHub stars. It operates as a centralized gateway for multiple AI providers, including OpenAI, Anthropic, and AWS Bedrock. It manages request routing and billing while storing sensitive data such as API keys and cloud credentials.

For example, a typical LiteLLM configuration consolidates credentials like this:

model_list:
– model_name: gpt-4
litellm_params:
api_key: sk-openai-xxxx
– model_name: claude-3
litellm_params:
api_key: sk-ant-xxxx
– model_name: bedrock/claude
litellm_params:
aws_access_key_id: AKIA-xxxx
aws_secret_access_key: xxxx

This vulnerability allows crafted input to influence database query execution, enabling attackers to retrieve credentials and configuration data used across integrated services.

Because LiteLLM consolidates access to multiple providers, a successful exploit can expose credentials across all connected environments, significantly increasing the overall impact.

The risk is higher for internet-facing deployments, where requests can reach the vulnerable code path without additional controls. The vulnerability primarily affects confidentiality and integrity, while normal application behavior can make detection less obvious.

Root Cause of CVE-2026-42208 in LiteLLM

The vulnerability originates in the API key verification logic, where user input is incorporated into a database query without proper separation from execution logic. This allows crafted input to alter how the query is processed, enabling direct access to underlying data.

The vulnerable query looks something like this:

query = f”SELECT * FROM api_keys WHERE key = ‘{bearer_token}'”

An attacker supplying the following as a Bearer token:

‘ UNION SELECT key, secret FROM litellm_config–

transforms the query into:

SELECT * FROM api_keys WHERE key = ”

UNION SELECT key, secret FROM litellm_config–

Because this occurs within the authentication flow, the system executes the query before validating the request. As a result, the authentication mechanism intended as control becomes the attack surface itself. The absence of input isolation in this critical path allows attackers to bypass access controls and retrieve sensitive information.

What CVE-2026-42208 Means for Your AI Infrastructure

The impact of CVE-2026-42208 goes beyond a single breach. Because LiteLLM sits at the center of your AI infrastructure, routing requests and managing credentials across every connected provider.  One successful exploit hands attacker the keys to the entire ecosystem.

Exposure of High-Value Credentials: The most immediate risk is the ability to extract sensitive data from the database, including API keys, provider credentials, and environment-level configuration values. These credentials are directly tied to external AI services and are used for request authentication.

Once exposed, these credentials can be reused without restriction, allowing attackers to interact with provider APIs as if they were legitimate users.

Expanded Blast Radius Due to Centralization: LiteLLM is designed to simplify integrations by consolidating credentials for multiple providers. While this improves operational efficiency, it also means a single compromise provides access to multiple services.

An attacker exploiting this vulnerability can gain visibility and control across all connected providers, making the impact significantly broader than a typical SQL injection vulnerability.

Unauthenticated Access Increases Exposure: Because the vulnerability is exploitable without authentication, there is no initial barrier to entry. Any internet-facing instance becomes a target. This drastically increases the likelihood of exploitation, especially in environments where the service is exposed for convenience or accessibility. A simple curl request is all it takes:

curl -H “Authorization: Bearer ‘ OR ‘1’=’1” \

https://your-litellm-instance.com/v1/models

No username, no password, no session token, just a crafted header reaching an open port. This drastically increases the likelihood of exploitation, especially in environments where the service is exposed for convenience or accessibility.

Potential for Further Abuse: While observed attacks have focused on data extraction, the nature of SQL injection means that query manipulation is not limited to reading data. Depending on database permissions, attackers may be able to influence application behavior, modify stored values, or disrupt normal operations.

CVE-2026-42208 Affected Versions

The vulnerability impacts LiteLLM versions where API key validation relies on unsafe query construction.

  • Affected Versions: v1.81.16 to v1.83.6
  • Fixed Versions: v1.83.7 and later
  • Recommended Version: v1.83.10-stable

In affected versions, user input from the Authorization header is directly embedded into SQL queries. From v1.83.7 onward, this behavior is replaced with parameterized queries, preventing input from altering query execution.

LiteLLM CVE-2026-42208: 36 Hours from Disclosure to Exploit

Within 36 hours of the advisory being published, attackers were already interacting with exposed LiteLLM instances. This short window highlights how closely threat actors monitor new disclosures and how quickly they act on them.

The attack behavior  followed a clear and structured pattern:

Initial Reconnaissance Through Schema Enumeration

The first stage of the attack focused on understanding the database structure. Attackers sent requests with carefully crafted payloads embedded in the Authorization header. These payloads were designed to probe how the database responded, revealing table names and column structures.

What stands out is that the payloads referenced specific internal table names associated with LiteLLM. This suggests that attackers have already reviewed publicly available source code or documentation before initiating the attack.

Targeted Extraction of Sensitive Data

Once the schema was understood, the attackers shifted to extracting meaningful data. Instead of broad queries, they focused on specific tables known to contain credentials and configuration values.

This approach reduces noise and increases efficiency, allowing attackers to retrieve high-value information quickly without triggering obvious anomalies.

Transition to Automated Exploitation

After the initial phase, similar payloads were observed from a different IP address within the same infrastructure range. The repetition of requests indicates a move from manual probing to automated execution.

The observed request progression in WAF logs looked like this:

[Stage 1 – Schema Probe]

Authorization: Bearer ‘ UNION SELECT table_name,2 FROM information_schema.tables–

[Stage 2 – Column Enumeration]

Authorization: Bearer ‘ UNION SELECT column_name,2 FROM information_schema.columns WHERE table_name=’litellm_verificationtoken’–

[Stage 3 – Credential Extraction]

Authorization: Bearer ‘ UNION SELECT token, user_id FROM litellm_verificationtoken–

Each stage built on the previous, moving from structure discovery to targeted data extraction within minutes. At this stage, the attack is scaled. Multiple systems can be targeted using the same payload patterns, increasing the reach of the exploit.

How to Detect CVE-2026-42208 in LiteLLM

Detecting this type of attack is not straightforward because it does not rely on breaking the application. The requests themselves appear valid at a protocol level, and the application continues to respond normally.

The difference lies in subtle deviations within request data.

Security teams should pay close attention to the structure of Authorization headers. The following patterns in your access logs are strong indicators of active exploitation:

POST /key/info HTTP/1.1

Authorization: Bearer ‘ UNION SELECT key,2 FROM litellm_verificationtoken–

Response: 200 OK

POST /key/info HTTP/1.1

Authorization: Bearer ‘ UNION SELECT token,user_id FROM litellm_verificationtoken–

Response: 200 OK

A 200 response to these requests means the injection succeeded and data was returned. Any SQL keyword, particularly single quotes, UNION SELECT, or references to internal database tables, appearing in Authorization headers should be treated as a critical alert.

Traffic patterns also provide signals. Repeated requests targeting the same endpoint with slight variations in payloads, especially when combined with unfamiliar user agents or source IPs, are reliable indicators of probing activity.

Log analysis also plays a key role in understanding whether exploitation has occurred. Reviewing database query logs, API usage patterns, and access logs can reveal signs of abnormal activity. Sudden spikes in usage, requests from unfamiliar locations, or unusual query behavior should be investigated in detail.

Effective detection requires visibility at the application layer, where these nuances can be inspected and correlated.

CVE-2026-42208 Mitigation & Remediation

The first and most immediate step is upgrading LiteLLM to a version where the vulnerable query logic has been corrected. Versions 1.83.7 and above replace unsafe query construction with parameterized queries, removing the injection point entirely. This change ensures that user input is handled as data, not executable code.

However, patching alone does not resolve the risk if the system is already exposed. If a vulnerable instance was accessible over the network, there is a real possibility that credentials were extracted without leaving obvious traces. In such cases, all stored API keys and provider credentials should be considered compromised. Rotating these credentials is necessary to prevent unauthorized reuse.

Alongside credential rotation, it is important to review how the service is exposed. LiteLLM is often deployed for convenience, which can lead to direct internet exposure. This significantly increases risk. Restricting access to trusted networks, placing the service behind an authenticated proxy, and enforcing network-level controls reduce the attack surface and limit who can reach the application.

Finally, this incident reinforces the need for consistent input validation across the application. Security controls should not be limited to external endpoints. Internal flows, especially those tied to authentication and database interaction, must be treated with the same level of scrutiny.

AppTrana WAAP Coverage for CVE-2026-42208

AppTrana WAAP has extended coverage for CVE-2026-42208, detecting and blocking SQL injection attempts targeting LiteLLM’s authentication flow before they reach the backend database. This coverage acts as a proactive control, ensuring that exploitation attempts are intercepted at the perimeter.

The screenshot below shows a malicious request with a SQL injection payload in the Authorization header, returned with a 406 Not Acceptable response, confirming the block.

AppTrana WAAP Coverage for CVE-2026-42208 Pre-Authentication SQL Injection in LiteLLM

Stay tuned for more relevant and interesting security articles. Follow Indusface on Facebook, Twitter, and LinkedIn.

Deepak
Deepak Kumar Choudhary

Deepak Choudhary is an adept Security Researcher at Indusface. He specializes in developing detection logic and signatures to identify various security vulnerabilities, including 0-day vulnerabilities, making him a frontline defender of digital environments.Driven by his passion for cyber defense, He continuously seeks to expand his knowledge of security concepts. He eagerly tackles the task of resolving vulnerable systems on platforms such as TryHackMe and HackTheBox, sharpening his skills in real-world scenarios. Through his expertise and dedication, he is committed to fortifying digital landscapes, ensuring a safer online experience for users and organizations alike.