Authorization bypass through user-controlled key in LibreChat - CVE-2026-31942
Published: June 3, 2026
LibreChat
Detailed vulnerability description
The vulnerability allows a remote user to overwrite other users' API keys.
The vulnerability exists due to improper access control in the API keys management endpoint when handling PUT requests to /api/keys. A remote user can inject a userId parameter in the request body to overwrite other users' API keys.
The issue is caused by the request body overriding the authenticated user's ID during key update processing.