Skip to main content
Vulnerability Database/CVE-2026-108748

CVE-2026-108748: Quarkus LangChain4j Memory Exhaustion Vulnerability

CVE-2026-108748 is a memory exhaustion flaw in Quarkus LangChain4j versions 1.9.0 through 1.14.1 that enables unauthenticated attackers to degrade server availability. This article covers technical details, affected versions, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-108748 Overview

CVE-2026-108748 affects Quarkus LangChain4j versions 1.9.0 through 1.14.1. The flaw resides in the chat-scopes WebSocket /_chat/routes endpoint and allows unauthenticated remote attackers to exhaust server memory. Repeated WebSocket CONNECT frames that reuse a single chatId leave orphaned scope entries in the activeScopes map. These orphaned entries persist until the JVM terminates, progressively degrading availability. The weakness is tracked under CWE-401: Missing Release of Memory after Effective Lifetime.

Critical Impact

Unauthenticated remote clients can trigger sustained memory growth in affected Quarkus LangChain4j applications, eventually producing a denial-of-service condition on the JVM.

Affected Products

  • Quarkus LangChain4j 1.9.0
  • Quarkus LangChain4j versions between 1.9.0 and 1.14.1
  • Quarkus LangChain4j 1.14.1

Discovery Timeline

  • 2026-10-11 - CVE-2026-108748 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-108748

Vulnerability Analysis

Quarkus LangChain4j exposes a WebSocket endpoint at /_chat/routes to manage chat sessions. Each session is associated with a chatId and tracked through a managed context class, ChatScopeManagedContext, which stores active scopes in an activeScopes map. When a client issues a WebSocket CONNECT frame, the endpoint registers a new scope keyed by the supplied chatId.

The endpoint fails to release prior scope entries when a client reuses an existing chatId across repeated CONNECT frames. Each new connection creates an additional scope, but no code path removes or replaces the previous entry. The map grows unbounded while the JVM runs.

An unauthenticated attacker can script this behavior against the public endpoint. Sustained connections drive heap consumption toward the configured maximum, producing OutOfMemoryError events and halting legitimate chat traffic. Technical analysis is available in the HackMD write-up on the ChatScope orphan leak and the VulnCheck advisory for the memory exhaustion issue.

Root Cause

The root cause is a missing deallocation path in the chat-scopes lifecycle. The relevant logic in ChatScopeManagedContext.java lines 297-311 adds scope entries without evicting prior entries that share the same chatId. The WebSocket handler in ChatRouteEndpoint.java lines 122-160 processes CONNECT frames without correlating reuse of a chatId.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker establishes repeated WebSocket connections to /_chat/routes while reusing the same chatId value in successive CONNECT frames. Each connection registers an orphaned scope that persists for the lifetime of the JVM, enabling a slow-burn resource exhaustion attack from a single remote client.

Detection Methods for CVE-2026-108748

Indicators of Compromise

  • Repeated WebSocket CONNECT frames to /_chat/routes from the same source address reusing one or a small set of chatId values.
  • Steadily rising JVM heap utilization on Quarkus LangChain4j workloads with no corresponding growth in legitimate user traffic.
  • OutOfMemoryError entries in application logs referencing chat-scope or managed-context classes.

Detection Strategies

  • Instrument the activeScopes map size through JMX or Micrometer and alert on unbounded growth over time.
  • Correlate WebSocket access logs with chatId reuse patterns to identify sessions with excessive CONNECT frames.
  • Baseline heap behavior for Quarkus LangChain4j services and alert on deviations that trend upward without release during idle periods.

Monitoring Recommendations

  • Enable verbose logging on the /_chat/routes endpoint to capture chatId, source IP, and connection timestamps.
  • Export JVM heap, non-heap, and garbage-collection metrics to a central observability stack for trend analysis.
  • Add synthetic monitoring that validates service responsiveness and heap headroom at regular intervals.

How to Mitigate CVE-2026-108748

Immediate Actions Required

  • Inventory all Quarkus LangChain4j deployments and identify instances running versions 1.9.0 through 1.14.1.
  • Restrict external exposure of the /_chat/routes WebSocket endpoint using a reverse proxy, ingress rules, or firewall policy.
  • Apply rate limiting and authentication at the proxy layer to curb unauthenticated connection floods against the endpoint.
  • Schedule periodic restarts of affected JVMs until a patched version is deployed to reclaim leaked memory.

Patch Information

Monitor the Quarkus LangChain4j GitHub repository for a release that supersedes 1.14.1 and addresses the orphaned scope lifecycle. Upgrade to the fixed version once available and validate that the activeScopes map releases entries on chatId reuse. Refer to the VulnCheck advisory for the authoritative fix reference.

Workarounds

  • Place the /_chat/routes endpoint behind an authenticated reverse proxy that validates session identity before forwarding WebSocket upgrades.
  • Enforce per-client connection limits and per-chatId concurrency caps at the ingress tier to prevent reuse amplification.
  • Configure JVM memory limits and automated container restarts so that memory pressure is contained within a single workload instance.
  • Disable the chat-scopes WebSocket feature in affected environments where it is not required for application functionality.
bash
# Example nginx configuration restricting WebSocket connections per client
limit_conn_zone $binary_remote_addr zone=ws_conn:10m;
limit_req_zone $binary_remote_addr zone=ws_req:10m rate=5r/s;

location /_chat/routes {
    limit_conn ws_conn 5;
    limit_req  zone=ws_req burst=10 nodelay;
    proxy_pass http://quarkus_backend;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.