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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to own LibreChat account
  2. Exploit
    POST to /api/auth/2fa/disable with no OTP
  3. Execution
    Backend skips verification
  4. Impact
    2FA 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

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

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

Why It Matters

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.

Business Impact: Low
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
popular self-hosted open-source AI chat platform, modest production footprint
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Low

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)NVD

cpe:2.3:a:librechat:librechat:0.7.9:-:*:*:*:*:*:*
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

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