OFFSITE.DARK
← Signals

Jun 29, 2026

2 min

Sploitus

  • litellm
  • sqli
  • cve-2026-42208
  • metasploit
  • ai

news

LiteLLM Proxy Pre-Auth SQL Injection Scanner (CVE-2026-42208)

Authorization bearer interpolated into PostgreSQL token lookup — pre-auth blind SQLi on LiteLLM 1.81.16–1.83.6; fixed 1.83.7, CVSS 9.8.

Summary

CVE-2026-42208 is a critical unauthenticated SQL injection in BerriAI LiteLLM Proxy with CVSS 9.8. Rapid7's Metasploit module auxiliary/scanner/http/litellm_proxy_sqli scans for the flaw.

During API-key verification the proxy interpolates the raw Authorization bearer value into WHERE v.token = '<token>' without parameterization. Tokens not starting with sk- skip hashing and reach the query verbatim. The failure-path lookup is reachable before authentication.

Affected versions: 1.81.16 through 1.83.6 (fixed 1.83.7). Discovered by Tencent YunDing Security Lab.

Key Findings

FindingDetail
CVECVE-2026-42208
WeaknessCWE-89 — SQL injection via Authorization header
Injection gateBearer values that do not start with sk- are not hashed
Scanner methodBenign PostgreSQL pg_sleep time-based differential (true vs false predicate)
False negativeEmpty virtual-key table — pg_sleep never executes without matching rows
Default port4000 (/v1/chat/completions)
Fixed version1.83.7

Attack Chain

POST /v1/chat/completions + Authorization: Bearer ' OR pg_sleep(5)-- <random>
        ↓
LiteLLM interpolates bearer into token lookup query (unparameterized)
        ↓
PostgreSQL evaluates injected predicate → delayed response
        ↓
Attacker confirms SQLi → data exfiltration / further exploitation (module is detect-only)

Random suffix in bearer defeats in-memory auth cache — repeated tokens would skip the database lookup.

Impact

Internet-exposed LiteLLM proxy instances with provisioned API keys are vulnerable to full database compromise. Common in AI gateway deployments bridging multiple LLM providers.

Mitigation

  1. Upgrade LiteLLM Proxy to 1.83.7+ immediately.
  2. Do not expose the proxy admin/API surface to untrusted networks.
  3. Monitor for Authorization headers containing SQL metacharacters (' OR, pg_sleep).

Related Signals

Sources

→ Source