Skip to content
MediumVulnerability

CVE-2026-54040: LibreChat 2FA backup code regeneration without authentication

Identifier
CVE-2026-54040
Published
Record updated
View JSON
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.3%

Summary

CVE-2026-54040 affects LibreChat before 0.8.4-rc1. The POST /api/auth/2fa/backup/regenerate endpoint regenerates all 2FA backup codes without requiring a TOTP token or existing backup code, so an attacker holding a stolen session token can replace a victim's backup codes and use them to bypass 2FA login or disable 2FA entirely. The weakness is classified as CWE-306, Missing Authentication for Critical Function.

Mitigation

Fixed in 0.8.4-rc1.