Skip to main content

LibreChat CVE-2025-8850

HIGH
Expected Behavior Violation (CWE-440)
2025-10-30 security@huntr.dev
8.8
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
4.3 MEDIUM

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

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Oct 07, 2026 - 21:45 vuln.today
CVE Published
Oct 30, 2025 - 20:15 nvd
HIGH 8.8

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.

AnalysisAI

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

Technical ContextAI

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.

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.

CVE-2024-11170 HIGH POC
8.8 Mar 20

A vulnerability in danny-avila/librechat version git 81f2936 allows for path traversal due to improper sanitization of f

CVE-2024-10361 CRITICAL POC
9.1 Mar 20

An arbitrary file deletion vulnerability exists in danny-avila/librechat version v0.7.5-rc2, specifically within the /ap

CVE-2026-22252 CRITICAL POC
9.1 Jan 12

LibreChat before v0.8.2-rc2 allows any authenticated user to execute shell commands as root inside the container through

CVE-2025-66450 HIGH POC
8.6 Dec 11

Stored cross-site scripting and tracker injection in LibreChat 0.8.0 and earlier allow a user who can create a chat to c

CVE-2025-66201 HIGH POC
8.6 Nov 29

LibreChat is a ChatGPT clone with additional features. Rated high severity (CVSS 8.6), this vulnerability is remotely ex

CVE-2025-69222 HIGH POC
8.1 Jan 07

LibreChat 0.8.1-rc2 has SSRF in the Actions feature that allows authenticated users to make the server perform requests

CVE-2024-11171 HIGH POC
7.5 Mar 20

In danny-avila/librechat version git 0c2a583, there is an improper input validation vulnerability. Rated high severity (

CVE-2025-7104 HIGH POC
7.5 Sep 29

A mass assignment vulnerability exists in danny-avila/librechat, affecting all versions. Rated high severity (CVSS 7.5),

CVE-2025-8849 HIGH POC
7.5 Oct 31

Unbounded `key` and `value` parameters on the LibreChat 0.7.9 memory API (`POST /api/memories` and `PATCH /api/memories/

CVE-2024-11173 MEDIUM POC
6.5 Mar 20

An unhandled exception in the danny-avila/librechat repository, version git 600d217, can cause the server to crash, lead

CVE-2024-10366 MEDIUM POC
6.5 Mar 20

An improper access control vulnerability (IDOR) exists in the delete attachments functionality of danny-avila/librechat

CVE-2025-69220 MEDIUM POC
5.9 Jan 07

LibreChat is a ChatGPT clone with additional features. Version 0.8.1-rc2 does not enforce proper access control for file

Share

CVE-2025-8850 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy