CVE-2026-54036: danny-avila LibreChat 2FA takeover via re-enrollment endpoint

CVE-2026-54036 · Severity: medium · CVSS 5.3 · Published 2026-06-25

LibreChat is an open-source interface for interacting with various AI models. A security flaw allows an attacker who has gained access to a user's active session to overwrite and take full control of that user's two-factor authentication (2FA) settings. This results in the legitimate user being locked out of their account's security features, as the attacker can replace the existing 2FA codes with their own without needing to provide the original verification.

Technologies: LibreChat. Vendors: LibreChat.

Quick answers

Is CVE-2026-54036 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-54036 being exploited in the wild.
How severe is CVE-2026-54036?
Medium severity, with a CVSS score of 5.3, published 25 June 2026.
Which products and versions are affected?
LibreChat < 0.8.4-rc1.
Is there a fix for CVE-2026-54036?
A patch was published on 2026-06-25: Fix confirmed in version 0.8.4-rc1 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-54036 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-54036?
Check whether you run LibreChat at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A missing authentication check for a critical function (CWE-306) exists in the `enable2FA` function within `api/server/controllers/TwoFactorController.js`. The `/api/auth/2fa/enable` endpoint fails to verify if 2FA is already active and does not require a valid TOTP or backup code before performing destructive operations. An attacker with a valid JWT (obtained via session hijacking or similar means) can trigger this endpoint to overwrite the victim's TOTP secret and backup codes, effectively resetting the 2FA state to 'disabled' while generating new credentials for the attacker to finalize. This allows for a complete 2FA takeover, as the attacker can then re-confirm 2FA using their own generated secret. The issue is resolved in version 0.8.4-rc1 by requiring verification if 2FA is already enabled.

Affected products

  • danny-avila LibreChat < 0.8.4-rc1

Timeline

  • 2026-06-02: advisory: GitHub Security Advisory published by vendor
  • 2026-06-25: disclosed: CVE published to NVD
  • 2026-06-25: patched: Fix confirmed in version 0.8.4-rc1

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.