Overview
CVE-2026-42208 is a pre-authentication SQL injection vulnerability in BerriAI LiteLLM, a widely deployed open-source LLM API gateway. An unauthenticated remote attacker can inject arbitrary SQL via the Authorization: Bearer header, directly targeting the authentication path — the query that verifies API keys. Successful exploitation gives full read/write access to the proxy database, which in production environments typically contains upstream provider credentials for OpenAI, Anthropic, AWS Bedrock, and other AI services.
Exploitation was observed in the wild within 36 hours of the advisory being publicly indexed, using scripted UNION-based payloads to extract credential tables.
What is LiteLLM?
LiteLLM is an open-source LLM gateway/proxy (45,000+ GitHub stars) that routes API calls to OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Google Vertex AI, and dozens of other model providers through a single unified endpoint. Enterprise teams deploy it to centralize API key management, enforce budget caps, log usage, and expose a single POST /v1/chat/completions surface to internal consumers.
Why it's a high-value target: The database managed by a LiteLLM proxy is uniquely dangerous to compromise. A single litellm_credentials table row typically holds an OpenAI organization key, an Anthropic console key with workspace admin rights, and AWS Bedrock IAM credentials — all in one place. In default Docker deployments the application database user is a PostgreSQL superuser, giving the attacker full read/write access to every table. As Sysdig characterized it: the blast radius is "closer to a cloud-account compromise than a typical web-app SQL injection."
Affected Versions
| Status | Versions |
|---|---|
| Vulnerable | >= 1.81.16, <= 1.83.6 |
| Fixed | >= 1.83.7 (recommended: 1.83.10-stable) |
Package: litellm (PyPI / pip)
Technical Details
Root Cause
The injection point is in litellm/proxy/utils.py, within PrismaClient.get_data(). The Authorization: Bearer <value> header is passed as {token} directly into a Python f-string that constructs a raw SQL query against the LiteLLM_VerificationToken table, with no sanitization or parameterization:
sql_query = f"""
SELECT v.*, t.spend AS team_spend, t.max_budget AS team_max_budget, ...
FROM "LiteLLM_VerificationToken" AS v
...
WHERE v.token = '{token}'
"""
A single quote in the bearer value escapes the string literal, allowing arbitrary SQL to be appended. Because this query is in the authentication path itself, it fires on every request to every proxied LLM route — no credentials required.
Two Exploitation Paths
Path A — optimized Python deployments: When LiteLLM runs with -O / PYTHONOPTIMIZE=1 (a common Docker optimization), Python strips all assert statements at runtime. The defensive guard that rejects tokens not prefixed with sk- is an assert — it disappears entirely, sending the raw bearer directly to the query.
Path B — standard deployments: Without the optimization flag, if the token does not start with sk-, the assertion fires and is caught by an exception handler that calls _enrich_failure_metadata_with_key_info(). This error-handling path also passes the unsanitized bearer into a SQL query.
Both paths reach vulnerable SQL construction; Path A is slightly more direct.
Attack Characteristics
| Attribute | Value |
|---|---|
| Authentication required | None — injection is in the auth check itself |
| Attack vector | Network — any accessible LiteLLM endpoint |
| Attack complexity | Low — single HTTP request |
| Technique | Time-based blind (detection), UNION-based (extraction) |
| Target | PostgreSQL via Prisma ORM |
Detection payload (time-based blind):
Authorization: Bearer ' OR (SELECT pg_sleep(6)) IS NULL --
Vulnerable hosts respond in ~6 seconds; patched hosts respond in under 100ms.
Extraction payload example:
Authorization: Bearer sk-litellm' UNION SELECT api_key,NULL,NULL,NULL,NULL FROM litellm_verificationtoken--
Discovery
Reported by Tencent YunDing Security Lab through BerriAI's bug bounty program. The GitHub advisory GHSA-r75f-5x8p-qvmc was published April 19, 2026, with a patched release available simultaneously.
Exploitation Context
Active exploitation was first observed by Sysdig on April 26, 2026 at approximately 04:24 UTC — roughly 36 hours after the advisory was indexed in the public GitHub Advisory Database on April 24. This gap reflects the time for automated vulnerability scanners to index the advisory and threat actors to weaponize the PoC.
Observed attack session (Sysdig analysis):
| Time (UTC) | Activity |
|---|---|
| 2026-04-26 04:24 | First IP begins time-based blind injection — confirms presence of pg_sleep response |
| 04:24–04:45 | Schema enumeration — 17 UNION payloads in 21 minutes; attacker retried with quoted PascalCase identifiers ("LiteLLM_VerificationToken") showing prior knowledge of Prisma schema conventions |
| 2026-04-26 05:06 | Second IP begins targeted credential extraction against three identified tables |
Tables targeted (in order):
LiteLLM_VerificationToken/litellm_verificationtoken— virtual API keys as SHA-256 hashes, master keys, team bindings, budget capslitellm_credentials.credential_values— upstream provider credentials (OpenAI, Anthropic, AWS Bedrock IAM)litellm_config— proxy environment variables, PostgreSQL DSN, webhook URLs
Threat actor infrastructure:
- Source IPs:
65.111.27.132and65.111.25.67(ASN AS200373 — 3xK Tech GmbH, Germany; VPS/proxy infrastructure) - User-Agent:
Python/3.12 aiohttp/3.9.1— fully scripted, not manual browsing - No confirmed post-exploitation activity (no authenticated follow-on, no key reuse observed in the analysis window)
Remediation
-
Upgrade to
litellm >= 1.83.7— the vendor recommends1.83.10-stableas the stable target. Runpip install --upgrade litellmor update your Docker image tag. -
Interim workaround (if immediate upgrade is not possible): add
disable_error_logs: trueundergeneral_settingsinconfig.yaml. This blocks the error-handling code path (Path B) that reaches the vulnerable query. Note: this only mitigates Path B; instances running with-O/PYTHONOPTIMIZE=1remain vulnerable via Path A. -
Deploy a WAF rule rejecting
Authorizationbearer values that do not match^sk-[A-Za-z0-9_-]+$. This blocks all known exploitation payloads with minimal false positives. -
Rotate all credentials — if your instance was running a vulnerable version (1.81.16–1.83.6) and was internet-accessible, assume all virtual keys and upstream provider credentials stored in the database were compromised. Rotate OpenAI, Anthropic, AWS Bedrock, and any other configured provider keys immediately.
-
Review PostgreSQL query logs for exploitation attempts — look for UNION keywords,
pg_sleep, or unusually long bearer values in queries againstlitellm_verificationtoken. The vendor provides a helper query in the official advisory. -
Restrict database permissions — in production, the LiteLLM app user should not be a PostgreSQL superuser. Scope it to only the tables it requires.
-
Network isolation — LiteLLM proxy endpoints should not be directly internet-facing without an authenticating reverse proxy or API gateway in front.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2026-42208 |
| Vendor / Product | BerriAI — LiteLLM |
| NVD Published | 2026-05-08 |
| NVD Last Modified | 2026-05-08 |
| CVSS 3.1 Score | 9.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Severity | CRITICAL |
| CWE | CWE-89 — Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) |
| CISA KEV Added | 2026-05-08 |
| CISA KEV Deadline | 2026-05-11 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2026-04-19 | GitHub security advisory GHSA-r75f-5x8p-qvmc published by BerriAI; vulnerability reported by Tencent YunDing Security Lab |
| 2026-04-24 | Advisory indexed in GitHub Advisory Database (~16:10 UTC) — begins surfacing to automated scanners |
| 2026-04-26 | First confirmed in-the-wild exploitation (~04:24 UTC), approximately 36 hours after public indexing; schema enumeration and credential extraction observed |
| 2026-05-08 | CVE-2026-42208 published on NVD; added to CISA Known Exploited Vulnerabilities catalog |
| 2026-05-11 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2026-42208 | Vulnerability Database |
| GitHub Security Advisory GHSA-r75f-5x8p-qvmc | Vendor Advisory / Patch |
| GitHub Advisory Database — GHSA-r75f-5x8p-qvmc | Vulnerability Database |
| LiteLLM v1.83.7-stable Release Notes | Vendor Advisory / Patch |
| LiteLLM Security Update: CVE-2026-42208 | Vendor Advisory |
| Sysdig: CVE-2026-42208 — Targeted SQL Injection Against LiteLLM's Authentication Path, Exploited 36 Hours After Disclosure | Security Research |
| Bishop Fox: CVE-2026-42208 — Pre-Authentication SQL Injection in LiteLLM Proxy | Security Research |
| The Hacker News: LiteLLM CVE-2026-42208 SQL Injection Exploited Within 36 Hours of Disclosure | News |
| Security Affairs: CVE-2026-42208 — LiteLLM Bug Exploited 36 Hours After Disclosure | News |
| Penligent: CVE-2026-42208 and the AI Gateway Credential Problem | Security Research |
| CCB Belgium: Warning — LiteLLM Pre-Auth SQL Injection (CVE-2026-42208) | US Government |
| CISA KEV Catalog Entry | US Government |
| CWE-89 — SQL Injection | Weakness Classification |