CVE-2026-54038: LibreChat: Server-Side ReDoS via Unescaped Regex in Principal Search

Published Nov 20, 2026
·
Updated

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.

Affected Software

1 affected component
librechat librechat<0.8.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.8.9

Event History

Nov 20, 2026
CVE Published
via MITRE·08:14 PM
Data Sourced
via MITRE·08:14 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue?

An attacker must be authenticated and have people-picker permission. They can target the GET /api/permissions/search-principals endpoint through its q parameter.

2

What is the practical impact of successful exploitation?

A user can submit a regex pattern that causes catastrophic backtracking, blocking the Node.js event loop and making the service unresponsive to concurrent users. Invalid regex patterns may also cause server errors.

3

Which deployments are affected and what is the fix?

LibreChat versions prior to 0.8.9 are affected. Upgrade to version 0.8.9, which fixes the unescaped regular-expression handling in principal and group searches.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203