Skip to content
SQL injection Write-up Intermediate

CVE-2026-42208: Targeted SQL injection against LiteLLM's authentication path discovered 36 hours following vulnerability disclosure

LiteLLM's authentication step concatenated the Bearer token into a SQL query without parameterisation, allowing an unauthenticated attacker to inject SQL and read sensitive tables. Attackers could extract virtual API keys, provider credentials, and environment variables, though no successful follow-on use was observed.

webflow.sysdig.com

Published on webflow.sysdig.com

linkedin

The author, on webflow.sysdig.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could read virtual API keys, stored provider credentials, and proxy environment variables, potentially leading to compromise of upstream model provider accounts, though no authenticated follow-on use was observed.

What the attacker needed

Network access to LiteLLM proxy port 4000; no credentials required

How it was found

  1. Send a POST request to /chat/completions with an Authorization: Bearer header containing a single quote to break out of the SQL string.
  2. Append a UNION SELECT statement targeting tables such as litellm_verificationtoken, litellm_credentials, or litellm_config.
  3. Vary the number of NULL placeholders to discover the column count of the original query.
  4. Retry with quoted PascalCase table names when lowercase names return no rows.
  5. Rotate to a second IP address and replay the payload set, then probe /key/generate and /key/info without authentication.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

LiteLLM is a proxy that sits in front of AI model providers and checks API keys. The bug meant that when it checked a key, it built a database query by pasting the key straight in, so a crafted key could change the query and read other data. An attacker could then steal stored keys and credentials.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.