CVE-2026-54040: CWE-306: Missing Authentication for Critical Function in danny-avila LibreChat
LibreChat is an enhanced ChatGPT clone that supports multiple AI providers. Prior to 0.8.4-rc1, the POST /api/auth/2fa/backup/regenerate endpoint regenerates all 2FA backup codes without requiring any TOTP token or existing backup code verification. An attacker with a stolen session token can silently replace a victim's backup codes and use them to bypass 2FA login or disable 2FA entirely. This vulnerability is fixed in 0.8.4-rc1.
AI Analysis
Technical Summary
The vulnerability CVE-2026-54040 in danny-avila's LibreChat affects versions before 0.8.4-rc1. The POST /api/auth/2fa/backup/regenerate endpoint does not require authentication via TOTP token or existing backup codes to regenerate all 2FA backup codes. An attacker possessing a stolen session token can silently replace a victim's backup codes, potentially bypassing or disabling two-factor authentication. This is classified under CWE-306 (Missing Authentication for Critical Function). The vulnerability has a CVSS 3.1 score of 5.9 (medium severity) and is fixed in version 0.8.4-rc1.
Potential Impact
An attacker with a stolen session token can regenerate 2FA backup codes without additional verification, allowing them to bypass or disable two-factor authentication protections. This compromises account security by enabling unauthorized access even when 2FA is enabled.
Mitigation Recommendations
Upgrade to LibreChat version 0.8.4-rc1 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are documented. Patch status is confirmed fixed in 0.8.4-rc1.
CVE-2026-54040: CWE-306: Missing Authentication for Critical Function in danny-avila LibreChat
Description
LibreChat is an enhanced ChatGPT clone that supports multiple AI providers. Prior to 0.8.4-rc1, the POST /api/auth/2fa/backup/regenerate endpoint regenerates all 2FA backup codes without requiring any TOTP token or existing backup code verification. An attacker with a stolen session token can silently replace a victim's backup codes and use them to bypass 2FA login or disable 2FA entirely. This vulnerability is fixed in 0.8.4-rc1.
CVSS v3.1
Score 5.9medium
Affected software
pkg:github/danny-avila/LibreChatRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-54040 in danny-avila's LibreChat affects versions before 0.8.4-rc1. The POST /api/auth/2fa/backup/regenerate endpoint does not require authentication via TOTP token or existing backup codes to regenerate all 2FA backup codes. An attacker possessing a stolen session token can silently replace a victim's backup codes, potentially bypassing or disabling two-factor authentication. This is classified under CWE-306 (Missing Authentication for Critical Function). The vulnerability has a CVSS 3.1 score of 5.9 (medium severity) and is fixed in version 0.8.4-rc1.
Potential Impact
An attacker with a stolen session token can regenerate 2FA backup codes without additional verification, allowing them to bypass or disable two-factor authentication protections. This compromises account security by enabling unauthorized access even when 2FA is enabled.
Mitigation Recommendations
Upgrade to LibreChat version 0.8.4-rc1 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are documented. Patch status is confirmed fixed in 0.8.4-rc1.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-11T16:57:50.020Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3d5b514853345fc13372bb
Added to database: 06/25/2026, 16:46:09 UTC
Last enriched: 06/25/2026, 17:02:14 UTC
Last updated: 06/25/2026, 20:14:37 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.