Insufficient Entropy in LibreChat - #VU166556

 

Insufficient Entropy in LibreChat - #VU166556

Published: November 18, 2026


Vulnerability identifier: #VU166556
CSH Severity: Low
CVSS v4: 6.8 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]
CVE-ID: N/A
CWE-ID: CWE-331
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to recover backup codes from exposed database records and potentially bypass two-factor authentication.

The vulnerability exists due to insufficient entropy in LibreChat's api/server/services/twoFactorService.js when generating 80-bit TOTP secrets and 32-bit backup codes, with backup codes stored as unsalted SHA-256 hashes. A local user can enumerate the backup-code space offline after obtaining stored hashes to recover unused second-factor credentials and, with a valid account password, bypass two-factor authentication.


Affected software

LibreChat

Remediation

Install security update from vendor's website.

LibreChat - update to 0.8.9

External References

Related Security Bulletins