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

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.63%, higher than 51% of CVEs (2026-12-01)
- Published: 2026-11-20T20:14:52.259Z
- Modified: 2026-11-24T17:54:52.597Z
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- LibreChat-AI LibreChat: >= 0.8.6-rc1, < 0.8.9

## 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>

## Sources

- CVE List: [CVE-2026-54038](https://www.cve.org/CVERecord?id=CVE-2026-54038), CVE Terms of Use, modified 2026-11-24
- NVD: [CVE-2026-54038](https://nvd.nist.gov/vuln/detail/CVE-2026-54038), Public domain, modified 2026-11-24

---

Page: https://cve.day/CVE-2026-54038 · Whole record: https://cve.day/CVE-2026-54038.json · Rebuilt by cve.day 2026-11-25T22:59:52.477Z
