CVE-2024-6587: Server-Side Request Forgery and API Key Disclosure in LiteLLM
- Vendors
- BerriAILitellm
CVE-2024-6587 is a server-side request forgery vulnerability affecting berriai LiteLLM, confirmed in version 1.38.10. A client-supplied api_base parameter in a chat-completions request can redirect the upstream request to an attacker-controlled destination. LiteLLM includes its configured OpenAI API key in the forwarded request, exposing the credential. Version 1.44.8 introduced is_request_body_safe() validation for top-level api_base parameters. Related administrative-endpoint variants bypassed that validation by nesting api_base inside litellm_params; combining this behavior with server-side environment-variable resolution enabled additional secret disclosure in subsequently tested releases.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation exposes a configured OpenAI API key, enabling unauthorized API use and associated charges within the key's permissions and limits. Related nested-parameter variants can disclose environment-held secrets, including the LiteLLM master key, potentially enabling gateway administration and unauthorized inference use. Attacker-directed requests can also target internal services or cloud metadata services, with potential cloud credential disclosure where network access and metadata protections permit. Observed activity includes honeypot exploitation attempts and laboratory-confirmed secret exfiltration; production compromise is not established.
Mitigation
If you can’t patch tonight, do this now.
Restrict LiteLLM administrative and control-plane access to trusted networks and require strong authentication with a unique, non-default master key. Apply outbound destination allowlisting for approved model providers, and block access to cloud metadata services, loopback addresses, private networks, and other unapproved destinations. Monitor requests containing client-controlled api_base values, especially nested configurations combining external destinations with environment-variable references. Treat any previously exposed default master key as compromised.
Remediation
Patch, then assume compromise.
Upgrade from affected releases. LiteLLM 1.44.8 fixes the original top-level api_base issue in chat-completions requests, but does not address the demonstrated nested-parameter secret-exfiltration variants. Deploy a hardened release incorporating the later request-validation changes; version 1.83.14 was confirmed to reject environment-variable references in request parameters. Rotate potentially exposed upstream API keys and master keys, revoke compromised credentials, and review their usage for unauthorized activity.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2024-6587 exploited in the wild?
- Yes. As of Nov 23, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2024-6587?
- Yes. As of Nov 23, 2026, Mallory has reports of a public exploit for CVE-2024-6587.
- Is there a patch for CVE-2024-6587?
- Upgrade from affected releases. LiteLLM 1.44.8 fixes the original top-level api_base issue in chat-completions requests, but does not address the demonstrated nested-parameter secret-exfiltration variants.
- What products are affected by CVE-2024-6587?
- BerriAI Litellm and Litellm.
- How severe is CVE-2024-6587?
- CVE-2024-6587 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 34.4% (98th percentile) as of Nov 23, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.