Enhancement: Do not expose custom endpoints to all users by default #3797
Replies: 1 comment 4 replies
-
At the moment, this is the point of having the config, to provide the configurable options to all users. There are role access based features already in the works, and as I discuss below, already many measures you can take.
This is possible, if you set the API key to https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/custom_endpoint#apikey On top of this, you can use many limiters offered by the automated moderation system:
I'm sorry to hear this, for this reason you should always use the |
Beta Was this translation helpful? Give feedback.
-
What features would you like to see added?
Currently, LibreChat's documentation advises users to setup custom endpoints in such a way that any user is able to utilize the API key for that endpoint. This is not mentioned in the documentation, and allows malicious users to take advantage of vulnerable servers by creating new accounts and using the endpoint without further authentication required.
The default behavior should be that only the admin account is able to utilize the custom endpoint and it would require an explicit opt-in to enable it for all users. Or alternatively, suggest an option that allows users to insert their own API keys. The documentation should further highlight this as a security concern.
More details
I forgot about a server that I was testing setting up an OpenRouter endpoint on and forgot to disable registration and put it behind a proxy. This allowed people to iterate through all domains, find my LibreChat one, and create an account to use the endpoint. In this case, I only lost $5, but it could have been a big issue if I had more money or enabled auto-refill. The existence of this kind of behavior (I recorded there may be 3 different services hijacking my server) implies that this is a widespread vulnerability.
Which components are impacted by your request?
Endpoints
Pictures
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions