Skip to main content

LibreChat CVE-2026-54038

| EUVDEUVD-2026-131855 MEDIUM
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-11-20 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with people-picker permission
  2. Delivery
    Send crafted q regex to search-principals
  3. Exploit
    Trigger catastrophic backtracking in RegExp
  4. Execution
    Block Node.js event loop ~4s per request
  5. Impact
    Repeat to sustain unavailability

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated account whose role carries people-picker permission - specifically VIEW_USERS, VIEW_GROUPS, or VIEW_ROLES - because only those roles can reach GET /api/permissions/search-principals. No special non-default server configuration is needed beyond that permission grant; the unescaped RegExp construction in findGroupsByNamePattern and searchPrincipals is present in affected versions (0.8.6-rc1 through <0.8.9) by default. The key limiting factors are: (1) authentication plus the people-picker privilege, which restricts the attack surface to trusted or compromised privileged accounts; and (2) availability-only impact with no code execution or data exposure. A secondary variant (q=[invalid) triggers a SyntaxError surfaced as an HTTP 500, which requires the same session but no backtracking payload.

Impact

This is a genuine but bounded availability issue, best read as a standard-priority fix rather than an emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, base 6.5) is internally consistent with the description: network-reachable, low complexity, but requiring an authenticated session (PR:L) that holds people-picker permission (VIEW_USERS, VIEW_GROUPS, or VIEW_ROLES), with impact confined to availability (C:N/I:N) and no scope change. No EPSS score and no CISA KEV entry were provided; the only exploitation signal is the PoC published inside the GHSA advisory, which was validated locally (4.2-4.3s event-loop block for input (a+)+$). The vuln.today decision label is 'this_month', not act_now/emergency, and the maintainer independently assessed severity as medium. The limiting factor that keeps real-world risk moderate is the authentication-plus-privilege prerequisite: only trusted, privileged accounts can reach the endpoint, so this is primarily an insider or compromised-privileged-account DoS rather than a broadly exploitable unauthenticated flaw. Net: real and worth patching on a normal cadence, but the privilege gate and availability-only impact argue against treating it as a drop-everything issue.

Exploit ScenarioDerived

An authenticated LibreChat user whose role grants people-picker permission sends GET /api/permissions/search-principals with q set to a catastrophic-backtracking pattern such as (a+)+$, which is compiled by Node's RegExp constructor on the event loop before any DB query runs. Each request blocks the single event loop for ~4+ seconds, making the entire server unresponsive to all other users; repeating in a tight loop sustains the denial of service at low request volume. A public PoC pattern and local validation output are published in the GHSA advisory, though not packaged as a standalone weaponized exploit.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 20, 2026

Denial of service in LibreChat before 0.8.9: the GET /api/permissions/search-principals endpoint constructs a JavaScript RegExp directly from the user-supplied q parameter, so an authenticated account whose role carries people-picker permission can submit a catastrophically backtracking pattern such as (a+)+$ and block the Node.js event loop for roughly four seconds per request, leaving every concurrent user unresponsive. The same unescaped pattern is forwarded into MongoDB $regex queries, and malformed input such as [invalid throws a SyntaxError that surfaces as an HTTP 500. The issue is availability-only (CVSS 6.5, PR:L, no confidentiality or integrity impact), is fixed in release 0.8.9, and a public PoC reference is included in the vendor advisory; it is not verified as working exploit code against arbitrary deployments, and there is no confirmed active exploitation.

RemediationAI

Vendor-released patch: 0.8.9. Upgrade LibreChat to v0.8.9 or later, which replaces attacker-supplied regex construction in findGroupsByNamePattern and searchPrincipals with escaped, index-bound word-prefix lookups over the derived nameTokens, emailTokens and usernameTokens arrays; after upgrading, run the supplied migration (npm run migrate:search-tokens, optionally with --dry-run or --batch-size=500) so users and groups created before the token fields existed remain searchable, noting the script is idempotent and safe to run while the server is up but exits the process explicitly because Redis cache clients otherwise keep it alive. Deployment teams running containers or stale images should rebuild from the v0.8.9 tag rather than assume an existing image is patched. If upgrading must be deferred, note that the trigger requires an authenticated session with people-picker permission, so tightening which roles hold VIEW_USERS, VIEW_GROUPS or VIEW_ROLES limits who can reach the endpoint and thus reduces exposure, though it does not remove the flaw for legitimate holders of that permission. See the advisory at https://github.com/LibreChat-AI/LibreChat/security/advisories/GHSA-fmfv-wxj3-m7x7 and the release notes at https://www.librechat.ai/changelog/v0.8.9 for the vendor's own guidance.

Affected VersionsENISA

LibreChat 0.8.6-rc1, < 0.8.9

Affected Packages

euvd librechat fix: 0.8.9

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-1333 (inefficient regular expression complexity), a ReDoS class in which attacker-controlled text is compiled as a regular expression rather than treated as a literal. In LibreChat, packages/data-schemas/src/methods/userGroup.ts calls new RegExp(namePattern, 'i') in findGroupsByNamePattern (line 89) and new RegExp(trimmedPattern, 'i') twice inside searchPrincipals (lines 561 and 604), with the pattern derived verbatim from the q query parameter. Because RegExp construction and evaluation happen synchronously on Node.js's single-threaded event loop, a pattern like (a+)+$ evaluated against a candidate name with trailing non-matching characters drives V8 into catastrophic backtracking, stalling every other in-flight request for the duration rather than just the attacker's own call. The same object is then passed to MongoDB as a $regex query, compounding load. Notably the same file already imports escapeRegExp and applies it correctly at line 697 for filter.search, so the omission at the other three call sites is an inconsistency rather than a missing capability. The vendor fix (PR #16719, commit de9d46fcd4f45feff849a848a84ff01becf619cb, contained in the v0.8.9 tag) removes attacker-controlled regex construction entirely, replacing it with escaped, index-bound word-prefix lookups over derived nameTokens, emailTokens and usernameTokens arrays, and adds a backfill migration script (npm run migrate:search-tokens) for users and groups saved before those tokens existed.

Know when Librechat gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 6.5 MEDIUM

Network endpoint, low-complexity single crafted request, but needs an authenticated people-picker-privileged account (PR:L); impact is sustained unavailability only (A:H, C:N/I:N).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

1
Patch available
Nov 20, 2026 - 22:04 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Low
popular open-source self-hosted AI chat clone, limited production/enterprise footprint
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2024-11170 HIGH POC
8.8 Mar 20

A vulnerability in danny-avila/librechat version git 81f2936 allows for path traversal due to improper sanitization of f

CVE-2024-10361 CRITICAL POC
9.1 Mar 20

An arbitrary file deletion vulnerability exists in danny-avila/librechat version v0.7.5-rc2, specifically within the /ap

CVE-2026-22252 CRITICAL POC
9.1 Jan 12

LibreChat before v0.8.2-rc2 allows any authenticated user to execute shell commands as root inside the container through

CVE-2025-8850 HIGH POC
8.8 Oct 30

LibreChat 0.7.9 lets an authenticated user turn off two-factor authentication on their own account without supplying a v

CVE-2025-66450 HIGH POC
8.6 Dec 11

Stored cross-site scripting and tracker injection in LibreChat 0.8.0 and earlier allow a user who can create a chat to c

CVE-2025-66201 HIGH POC
8.6 Nov 29

LibreChat is a ChatGPT clone with additional features. Rated high severity (CVSS 8.6), this vulnerability is remotely ex

CVE-2025-69222 HIGH POC
8.1 Jan 07

LibreChat 0.8.1-rc2 has SSRF in the Actions feature that allows authenticated users to make the server perform requests

CVE-2024-11171 HIGH POC
7.5 Mar 20

In danny-avila/librechat version git 0c2a583, there is an improper input validation vulnerability. Rated high severity (

CVE-2025-7104 HIGH POC
7.5 Sep 29

A mass assignment vulnerability exists in danny-avila/librechat, affecting all versions. Rated high severity (CVSS 7.5),

CVE-2025-8849 HIGH POC
7.5 Oct 31

Unbounded `key` and `value` parameters on the LibreChat 0.7.9 memory API (`POST /api/memories` and `PATCH /api/memories/

CVE-2024-11173 MEDIUM POC
6.5 Mar 20

An unhandled exception in the danny-avila/librechat repository, version git 600d217, can cause the server to crash, lead

CVE-2024-10366 MEDIUM POC
6.5 Mar 20

An improper access control vulnerability (IDOR) exists in the delete attachments functionality of danny-avila/librechat

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy