CVE-2026-54038
Received Received - Intake

ReDoS in LibreChat via Unsanitized RegExp in User Group Search

Vulnerability report for CVE-2026-54038, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-20

Last updated on: 2026-11-20

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-20
Last Modified
2026-11-20
Generated
2026-11-21
AI Q&A
2026-11-21
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
librechat librechat 0.8.9

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1333 The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

LibreChat versions before 0.8.9 have a vulnerability in the GET /api/permissions/search-principals endpoint. The q parameter is passed directly to JavaScript RegExp and MongoDB regex queries without proper escaping of metacharacters. This allows an authenticated user with people-picker permission to submit a regex pattern causing catastrophic backtracking, which blocks the Node.js event loop and makes the service unresponsive to other users. Even invalid patterns can cause server errors.

Detection Guidance

Check if your LibreChat instance is running a version prior to 0.8.9. Inspect the API endpoint /api/permissions/search-principals for unusual patterns in requests that may cause high CPU usage or server errors. Monitor Node.js event loop delays or unresponsive services during regex pattern submissions.

Impact Analysis

If you use LibreChat versions before 0.8.9, an attacker with authenticated access and people-picker permission could exploit this to crash the service, making it unavailable for all users. This denial-of-service condition could disrupt operations and require restarting the application.

Compliance Impact

This vulnerability could impact compliance with GDPR and HIPAA by causing service disruptions due to denial-of-service conditions. Unauthorized users may exploit the issue to block the Node.js event loop, making the service unresponsive and potentially violating availability requirements in these regulations.

Mitigation Strategies

Upgrade LibreChat to version 0.8.9 or later immediately. If upgrading is not possible, restrict access to the /api/permissions/search-principals endpoint to trusted users only. Implement rate limiting on API requests to prevent abuse.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-54038. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...