CVE-2026-54038
LibreChat: Server-Side ReDoS via Unescaped Regex in Principal Search
- State
- Published
- Severity
- 6.5 Medium
- Published
- Nov 20, 2026
- Updated
- Nov 20, 2026
- Reserved
- Jun 11, 2026
Description
LibreChat is an enhanced ChatGPT clone that supports multiple AI providers. Prior to 0.8.9, GET /api/permissions/search-principals passes the q parameter to JavaScript RegExp construction and MongoDB regex queries in packages/data-schemas/src/methods/userGroup.ts findGroupsByNamePattern and searchPrincipals without escaping metacharacters. An authenticated user with people-picker permission can submit a catastrophic-backtracking pattern that blocks the Node.js event loop and makes the service unresponsive to concurrent users; invalid patterns can also produce server errors. This issue is fixed in version 0.8.9.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 6.5 Medium | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | GitHub_M |
Weaknesses
- CWE-1333 Inefficient Regular Expression Complexity
Affected Products
| Product | Versions |
|---|---|
LibreChatLibreChat-AI |
|
References
- https://github.com/LibreChat-AI/LibreChat/security/advisories/GHSA-fmfv-wxj3-m7x7
- https://github.com/LibreChat-AI/LibreChat/pull/16719
- https://github.com/LibreChat-AI/LibreChat/commit/de9d46fcd4f45feff849a848a84ff01becf619cb
- https://github.com/LibreChat-AI/LibreChat/releases/tag/v0.8.9
- https://www.librechat.ai/changelog/v0.8.9
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.