Add LiteLLM proxy pre-auth SQL injection scanner (CVE-2026-42208) #21567
All Vouch review confidence checks passed
Residual risk 0.31 = Change Risk (0.73) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.73 · 420 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.362
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.073
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #21567"
general
weight: 0.35
kenlacroix
Summary
Adds
auxiliary/scanner/http/litellm_proxy_sqli, a detection module forCVE-2026-42208 (CVSS 9.3,
on the CISA KEV list) — a pre-authentication SQL injection in
BerriAI LiteLLM proxy.
Vulnerability
During API-key verification the proxy interpolates the raw
Authorizationbearervalue into a PostgreSQL query without parameterization:
LiteLLM only SHA-256-hashes bearer tokens that begin with
sk-; a value that doesnot start with
sk-reaches the query verbatim, so a single quote breaks out ofthe string literal. The lookup runs on the authentication-failure path, which is
reachable before authentication. Affected versions are
1.81.16through1.83.6;fixed in
1.83.7by switching to a parameterized query (commit4dc416ee74).What the module does
This is a detection module. It confirms the flaw with a benign time-based
check built on the framework's PostgreSQL time-based blind SQLi library
(
PostgreSQLi::TimeBasedBlindviacreate_sqli+test_vulnerable) and neverreads or exfiltrates data.
The library issues a true/false request pair through the injectable
Authorizationbearer: one whose injected predicate calls
pg_sleep(SqliDelay)only when atautology is true, and one whose predicate never sleeps. The target is reported
vulnerable only when the true case is delayed by ~
SqliDelaywhile the false casereturns promptly, so a server that is merely slow (which delays both) is not
flagged.
SqliDelaydefaults to 5.0s (raised from the library default) for aclearer remote signal.
Detection requirement: the injectable predicate is a
WHEREclause PostgreSQLevaluates per matching row, so the time-based signal only fires when the target has
provisioned at least one virtual key (a non-empty token table). This is the case
for any LiteLLM proxy in real use; a freshly initialized proxy with no keys may not
respond. The limitation is documented in the module and the docs.
Verification
Tested against the official images — vulnerable
main-v1.83.3-stableand patchedmain-v1.83.7-stable, each with a PostgreSQL backend and one provisioned virtualkey:
checkreturnsVulnerable/Saferespectively. The module also degrades cleanly(reports not vulnerable, no errors) against a non-LiteLLM HTTP server and against a
vulnerable proxy whose token table is empty.
Documentation with the full Docker lab setup and scenarios is included at
documentation/modules/auxiliary/scanner/http/litellm_proxy_sqli.md.Verification Steps
1. Start a vulnerable LiteLLM proxy with a PostgreSQL backend and provision one key (see docs)
2.
use auxiliary/scanner/http/litellm_proxy_sqli3.
set RHOSTS4.
run— the module reports the injection when the injected predicate sleeps on true but not on false