-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: v1/realtime endpoint not checking api key (Vulnerability) #6926
Comments
Looking through the code now, and it's not super straightforward to make an equivalent
|
WIP branch: main...mirodrr2:litellm:check_api_key_on_v1_realtime Not tested yet, and has a lot of duplicate code I'd like to avoid, but that's the general idea. Very new to this repo so would appreciate any guidance on this I think closing this security vulnerability is high priority, as it makes the realtime voice api unusable for anyone who needs authentication Will revisit next week after thanksgiving and try to get a decent quality PR in |
@krrishdholakia , I saw you added the initial support for the realtime voice api. Do you plan to add full user api key support to it? |
What happened?
With the v1/realtime endpoint, you are able to call it without a valid api key if
OPENAI_API_KEY
is defined in the Proxy. This is a security vulnerability if you are trying to run the proxy on a public endpointIf you look at the v1/realtime endpoint, there's no dependency on
user_api_key_auth
like there is with all the other endpoints:litellm/litellm/proxy/proxy_server.py
Line 4341 in 8fd3bf3
A version of
user_api_key_auth
will need to be made that supportswebsocket: WebSocket
instead ofrequest: Request
litellm/litellm/proxy/auth/user_api_key_auth.py
Line 198 in 8fd3bf3
You can easily reproduce this issue by taking the sample code from the LiteLLM documenation and putting in a bad api key. It will still connect: https://docs.litellm.ai/docs/realtime
Relevant log output
No response
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: