LiteLLM is_request_body_safe Server-Side Request Forgery Information Disclosure Vulnerability
LiteLLM did not properly validate the api_base parameter in chat completion requests, allowing an authenticated attacker to make the server access arbitrary URIs. This could disclose sensitive information in the context of the service account.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to disclose sensitive information on affected installations of LiteLLM. Authentication is required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the api_base parameter was used to build an outbound request without validating the URI against an allowlist or blocking internal addresses.
Impact
An authenticated attacker could disclose sensitive information in the context of the service account.
What the attacker needed
Authentication required
The fix
The vendor issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you send a chat request to LiteLLM, you can include a setting called api_base that tells it where to send the request. The software did not check that this address was safe, so someone with an account could point it at internal systems and read what came back. This is called server-side request forgery: the server makes a request on the attacker's behalf.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.