Missing Authentication for Critical Function in LibreChat - CVE-2026-54040
Published: June 3, 2026
Vulnerability details
The vulnerability allows a remote user to bypass two-factor authentication and disable two-factor authentication.
The vulnerability exists due to missing authentication for a critical function in the POST /api/auth/2fa/backup/regenerate endpoint when handling requests to regenerate backup codes. A remote user can send a crafted authenticated request using a stolen session token to bypass two-factor authentication and disable two-factor authentication.
The endpoint also returns newly generated plaintext backup codes and their hashes in the response.