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

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-25T15:45:23.953Z
- Modified: 2026-10-25T22:10:00.150Z
- Weaknesses: CWE-306
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- danny-avila LibreChat: < 0.8.4-rc1
- librechat librechat: up to 0.8.3

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N`

## References

- <https://github.com/danny-avila/LibreChat/security/advisories/GHSA-h59w-x9h4-m6gv> (exploit, vendor-advisory)

## Sources

- CVE List: [CVE-2026-54040](https://www.cve.org/CVERecord?id=CVE-2026-54040), CVE Terms of Use, modified 2026-06-25
- NVD: [CVE-2026-54040](https://nvd.nist.gov/vuln/detail/CVE-2026-54040), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-54040 · Whole record: https://cve.day/CVE-2026-54040.json · Rebuilt by cve.day 2026-11-25T22:59:26.386Z
