LibreChat
CVE-2025-8850
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to own LibreChat account
-
ExploitPOST to /api/auth/2fa/disable with no OTP
-
ExecutionBackend skips verification
-
Impact2FA disabled on own account
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Expected behavior violation
|
| Exploitation Conditions | Requires an authenticated session on a local-provider LibreChat account that already has 2FA enabled (PR:L); the attacker directly invokes POST /api/auth/2fa/disable and the pre-patch backend omits OTP/backup-code validation, so no second factor is needed. The decisive LIMITING factor is scope: the endpoint acts only on the caller's own account, so it cannot be used to disable another user's 2FA or to achieve account takeover. Exploitation is also bounded to unpatched version 0.7.9 and to accounts where 2FA was configured in the first place. |
| Impact | The input CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H = 8.8 High) is sharply inconsistent with the vulnerability as described and overstates real-world risk. The flaw lets an already-authenticated user disable 2FA on THEIR OWN account by calling /api/auth/2fa/disable without supplying a valid OTP or backup code; the description explicitly notes it 'does not lead to full account compromise' and only lets users 'weaken the security of their own accounts.' That contradicts the full High confidentiality/integrity/availability impacts and even the network-exploitability framing - there is no cross-tenant or victim-targeted impact, so C:H/I:H/A:H appears unjustified and the true severity is Low. No EPSS score and no KEV status were provided; absence of KEV plus the self-only impact means there is no evidence of, or strong incentive for, active exploitation. A public proof-of-concept exists (huntr bounty), and the vendor patch is confirmed by the referenced GitHub commit, which adds TOTP/backup-code verification in TwoFactorController.js. Net: publicly available exploit code exists but this is a low-priority, self-service security-downgrade issue rather than a widespread threat - the headline 8.8 should not drive emergency prioritization. Verify the inflated CVSS with the vendor/NVD before acting on the numeric score. |
| Exploit ScenarioDerived | An authenticated LibreChat user (or an attacker who has already hijacked a valid session) directly sends a POST to /api/auth/2fa/disable; because the pre-patch backend never validates the OTP or backup code, 2FA is turned off on that account with no second-factor challenge. A public PoC is available via the huntr bounty report. The practical effect is limited to weakening the attacker's own account's security posture, not compromising other users. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
LibreChat 0.7.9 lets an authenticated user turn off two-factor authentication on their own account without supplying a valid TOTP token or backup code, because the POST /api/auth/2fa/disable handler skips the second-factor verification that the rest of the 2FA flow enforces. The scope is narrow: the endpoint only affects the caller's own account, requires an existing authenticated session on a local-provider account that already had 2FA enabled (PR:L per the vector), and does not enable account takeover - our authoritative assessment therefore scores it CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N, far below the published 8.8 vector, which overstates C/I/A. Publicly available exploit code exists (the Huntr bounty write-up), an upstream fix commit is available, and there is no indication of confirmed active exploitation (no CISA KEV listing).
RemediationAI
Apply the upstream fix from https://github.com/danny-avila/librechat/commit/7e4c8a5d0d2dbe5bf8fd272ff6acafb27d24744f, or upgrade to the first LibreChat release that contains it (the supplied data identifies the commit but not a tagged version, so verify the release notes before assuming a version number). After patching, the endpoint returns HTTP 400 when neither token nor backupCode is supplied and HTTP 401 when verification fails, closing the bypass. Also re-enable 2FA on any affected account and review authentication logs for POST requests to /api/auth/2fa/disable that cleared twoFactorEnabled, since an attacker who already holds a session has effectively weakened a control intended to protect that session. If the patch cannot be applied immediately, compensating controls for self-hosted deployments include blocking or rate-limiting POST /api/auth/2fa/disable at the reverse proxy and requiring an out-of-band re-authentication before re-enabling it - the trade-off is that legitimate users then cannot self-service disable 2FA and will need administrator assistance, and any proxy rule must be kept in sync as the route evolves. A second option is to move affected users to an external identity provider (provider other than 'local'), which removes them from this code path entirely at the cost of re-provisioning accounts. Because the flaw only affects the caller's own account and does not permit account takeover, do not treat it as an emergency; prioritize it as a hardening and audit item.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
LibreChat is a Node.js/Express self-hosted chat application that stores a per-user TOTP secret (totpSecret) and a set of backup codes and exposes 2FA management through the API routes under /api/auth/2fa/. The front end, via packages/data-provider, called disableTwoFactor() with no request body, and the pre-patch TwoFactorController on the server performed no verification before clearing totpSecret, backupCodes and twoFactorEnabled. The root-cause class is CWE-440 (Expected Behavior Violation): the handler simply did not implement the verification behavior the endpoint contract implies, so a direct POST to /api/auth/2fa/disable with an authenticated session silently removed the second factor. The reference commit (7e4c8a5d0d2dbe5bf8fd272ff6acafb27d24744f) demonstrates the intended design: it destructures { token, backupCode } from req.body, returns HTTP 400 when neither is supplied, calls verifyTOTP(secret, token) or verifyBackupCode({ user, backupCode }) when twoFactorEnabled is true, and returns HTTP 401 on a failed check - matching the pattern already used by the confirm-2FA path. The corresponding client-side changes pass a TDisable2FARequest payload through the data service. CPE data confirms only the open-source LibreChat codebase at version 0.7.9 is affected; no downstream vendor builds are identified in the supplied intelligence.
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Authenticated user (PR:L) acting only on their own account over the network; no data disclosure (C:N) and no availability loss (A:N), just a minor self-inflicted integrity/security downgrade (I:L).
Primary rating from NVD.
CVSS VectorNVD
DescriptionNVD
In danny-avila/librechat version 0.7.9, there is an insecure API design issue in the 2-Factor Authentication (2FA) flow. The system allows users to disable 2FA without requiring a valid OTP or backup code, bypassing the intended verification process. This vulnerability occurs because the backend does not properly validate the OTP or backup code when the API endpoint '/api/auth/2fa/disable' is directly accessed. This flaw can be exploited by authenticated users to weaken the security of their own accounts, although it does not lead to full account compromise.
Executive ViewAI
LibreChat 0.7.9 contains a high-severity vulnerability that allows an authenticated user to disable two-factor authentication on their own account without providing a valid TOTP token or backup code. Publicly available exploit code exists, but the flaw is narrow: it requires an existing authenticated session, does not enable account takeover, and carries a low authoritative CVSS score of 3.1. Leadership should prioritize patching because MFA bypasses can undermine defense-in-depth, though the business impact is limited to weakening an individual account's security posture.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Affected Products (CPE)NVD
A vulnerability in danny-avila/librechat version git 81f2936 allows for path traversal due to improper sanitization of f
An arbitrary file deletion vulnerability exists in danny-avila/librechat version v0.7.5-rc2, specifically within the /ap
LibreChat before v0.8.2-rc2 allows any authenticated user to execute shell commands as root inside the container through
Stored cross-site scripting and tracker injection in LibreChat 0.8.0 and earlier allow a user who can create a chat to c
LibreChat is a ChatGPT clone with additional features. Rated high severity (CVSS 8.6), this vulnerability is remotely ex
LibreChat 0.8.1-rc2 has SSRF in the Actions feature that allows authenticated users to make the server perform requests
In danny-avila/librechat version git 0c2a583, there is an improper input validation vulnerability. Rated high severity (
A mass assignment vulnerability exists in danny-avila/librechat, affecting all versions. Rated high severity (CVSS 7.5),
Unbounded `key` and `value` parameters on the LibreChat 0.7.9 memory API (`POST /api/memories` and `PATCH /api/memories/
An unhandled exception in the danny-avila/librechat repository, version git 600d217, can cause the server to crash, lead
An improper access control vulnerability (IDOR) exists in the delete attachments functionality of danny-avila/librechat
LibreChat is a ChatGPT clone with additional features. Version 0.8.1-rc2 does not enforce proper access control for file
NVD
CVE.org
EPSS
GitHub
Exploit-DB