CVE-2025-8850
NixOS vulnerability analysis and mitigation

Overview

CVE-2025-8850 is an insecure API design vulnerability in the 2-Factor Authentication (2FA) flow of LibreChat version 0.7.9. It allows authenticated users to disable 2FA on their accounts without providing a valid OTP or backup code by directly calling the /api/auth/2fa/disable API endpoint. The vulnerability was published on October 30, 2025, and affects LibreChat versions up to and including 0.7.9 (prior to v0.8.0-rc2). It carries a CVSS v3.1 base score of 8.8 (High) (Red Hat CVE, Huntr Bounty).

Technical details

The root cause is classified as CWE-440 (Expected Behavior Violation): the backend disable2FA handler in api/server/controllers/TwoFactorController.js did not validate the presence or correctness of a TOTP token or backup code before clearing the user's totpSecret, backupCodes, and twoFactorEnabled fields. An authenticated attacker could send a direct HTTP POST request to /api/auth/2fa/disable without supplying any OTP or backup code, and the server would unconditionally disable 2FA for the account. The fix, introduced in commit 7e4c8a5, adds a verification gate: if twoFactorEnabled is true, the endpoint now requires either a valid TOTP token or a valid backup code before proceeding (GitHub Commit, Huntr Bounty).

Impact

An authenticated attacker (or a malicious user acting on their own account) can silently remove the 2FA protection from a LibreChat account, reducing it to single-factor authentication and making it significantly easier for subsequent credential-based attacks (e.g., phishing, credential stuffing) to succeed. While the vulnerability does not directly grant access to other accounts or lead to immediate full account compromise, it degrades the security posture of affected accounts and could serve as a preparatory step for further unauthorized access. The CVSS score of 8.8 reflects high potential impacts on confidentiality, integrity, and availability if the weakened account is subsequently compromised (Huntr Bounty, Red Hat CVE).

Exploitation steps

  1. Authentication: Log in to a LibreChat instance (version 0.7.9 or earlier) with valid credentials for the target account — the attacker must be authenticated.
  2. Identify the endpoint: Locate the 2FA disable API endpoint at /api/auth/2fa/disable.
  3. Send unauthenticated disable request: Issue a direct HTTP POST request to /api/auth/2fa/disable using the authenticated session token, with an empty or omitted request body (no token or backupCode fields).
  4. Observe result: The server, lacking OTP validation logic in the vulnerable version, processes the request and clears totpSecret, backupCodes, and sets twoFactorEnabled to false for the account.
  5. Account weakened: The account now relies solely on password authentication, making it susceptible to credential-based attacks without triggering 2FA challenges (Huntr Bounty, GitHub Commit).

Indicators of compromise

  • Network: Unexpected HTTP POST requests to /api/auth/2fa/disable with an empty or missing request body (no token or backupCode fields), particularly outside of normal user activity hours.
  • Logs: Application logs showing successful 2FA disable operations (HTTP 200 responses from /api/auth/2fa/disable) without a preceding OTP verification step or without corresponding user-initiated UI actions.
  • Application State: User accounts where twoFactorEnabled transitions from true to false and totpSecret is cleared without a corresponding support ticket or user-reported action — especially if the change was not initiated through the standard UI flow.

Mitigation and workarounds

Update LibreChat to a version after 0.7.9 (v0.8.0-rc2 or later), which includes the patch in commit 7e4c8a5 that enforces OTP or backup code verification before allowing 2FA to be disabled. There is no documented configuration-based workaround for the vulnerable version; upgrading is the only reliable remediation. Additionally, administrators should audit logs for unexpected 2FA disable events and consider implementing monitoring alerts for 2FA configuration changes (GitHub Commit, Huntr Bounty).

Community reactions

The vulnerability was reported through the Huntr bug bounty platform and assigned a CVE by the NVD. Red Hat has also tracked the advisory. No notable public researcher commentary or significant social media discussion has been identified beyond standard vulnerability database aggregation (Red Hat CVE, Huntr Bounty).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-45568CRITICAL9.9
  • Python logoPython
  • zrok
NoYesJul 16, 2026
CVE-2026-45576HIGH8.3
  • NixOS logoNixOS
  • zrok
NoYesJul 16, 2026
CVE-2026-36590HIGH7.5
  • NixOS logoNixOS
  • nanomq
NoNoJul 15, 2026
CVE-2026-59259MEDIUM6
  • NixOS logoNixOS
  • n8n
NoYesJul 15, 2026
CVE-2026-26032MEDIUM5.4
  • NixOS logoNixOS
  • ivy
NoYesJul 15, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management