CVE-2026-137586 in LibreChat
Summary
by MITRE • 11/26/2026
LibreChat 0.7.3 before 0.8.9 contains an improper input type validation vulnerability in the requireLdapAuth middleware of the /api/auth/login route that allows unauthenticated attackers to crash the server. Attackers can send a JSON login request with an existing directory user's email and a non-string password, triggering an ldapjs assertion error that terminates the Node.js process.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/28/2026
The vulnerability identified in LibreChat versions prior to 0.8.9 represents a critical failure in input validation within the authentication subsystem, specifically affecting the requireLdapAuth middleware associated with the /api/auth/login endpoint. This flaw stems from an improper handling of data types during the processing of login credentials. In secure application design, inputs received from external sources must be strictly validated against expected formats and types before being passed to downstream logic libraries. In this instance, the middleware fails to enforce that the password field is a string type prior to initiating Lightweight Directory Access Protocol (LDAP) authentication operations. This lack of strict typing allows an attacker to bypass standard validation checks by submitting a JSON payload where the email corresponds to an existing user in the directory but the password field contains a non-string value, such as a number or null object.
When the application processes this malformed request, it passes the invalid data type directly to the ldapjs library for authentication verification. The ldapjs library expects specific string inputs for credentials and throws an assertion error when encountering unexpected types. Because LibreChat does not catch this exception within its own error handling mechanisms, the unhandled exception propagates up the call stack, resulting in a fatal crash of the Node.js process. This behavior classifies as a Denial of Service vulnerability, allowing any unauthenticated actor to disrupt service availability simply by sending a single crafted HTTP request. The impact is severe for production environments where uptime and reliability are paramount, as repeated exploitation can lead to continuous server restarts or complete unavailability until manual intervention occurs.
From a classification perspective, this issue aligns with CWE-20 Improper Input Validation, specifically the failure to validate data types against expected schemas. It also maps to MITRE ATT&CK technique T1499 Endpoint Denial of Service, as the attacker leverages application logic flaws to exhaust system resources or cause process termination without requiring valid credentials. The vulnerability highlights a common pitfall in Node.js applications where asynchronous operations and external library calls are not adequately wrapped in try-catch blocks or validated for type safety before execution.
To mitigate this risk, immediate patching is required by upgrading LibreChat to version 0.8.9 or later, which addresses the input validation logic within the authentication middleware. For organizations unable to upgrade immediately, a temporary workaround involves implementing a reverse proxy rule that rejects requests with non-string password fields at the network level before they reach the application server. Additionally, developers should enforce strict schema validation using libraries like Joi or Zod on all incoming API payloads and ensure that external library calls are wrapped in robust error handling blocks to prevent unhandled exceptions from crashing the process. Regular security audits focusing on input sanitization and type coercion practices can further reduce the likelihood of similar vulnerabilities arising in other parts of the application stack.