A Server-Side Request Forgery (SSRF) vulnerability exists in berriai/litellm version 1.38.10. This vulnerability allows users to specify the `api_base` parameter when making requests to `POST /chat/completions`, causing the application to send the request to the domain specified by `api_base`. This request includes the OpenAI API key. A malicious user can set the `api_base` to their own domain and intercept the OpenAI API key, leading to unauthorized access and potential misuse of the API key.
https://thehackernews.com/2025/03/over-400-ips-exploiting-multiple-ssrf.html
https://www.greynoise.io/blog/new-ssrf-exploitation-surge
https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997
https://github.com/berriai/litellm/commit/ba1912afd1b19e38d3704bb156adf887f91ae1e0