Skip to content

blaze: Unbounded WebSocket message aggregation in http4s-blaze-server

High severity GitHub Reviewed Published Jul 23, 2026 in http4s/blaze • Updated Jul 24, 2026

Package

maven org.http4s:http4s-blaze-server_2.12 (Maven)

Affected versions

< 0.23.18

Patched versions

0.23.18
maven org.http4s:http4s-blaze-server_2.13 (Maven)
< 0.23.18
>= 1.0.0-M1, < 1.0.0-M42
0.23.18
1.0.0-M42
maven org.http4s:http4s-blaze-server_3 (Maven)
>= 1.0.0-M1, < 1.0.0-M42
1.0.0-M42

Description

Summary

http4s-blaze-server aggregates the fragments of an incoming WebSocket
message with no limit on total size or fragment count. A client that
completes a WebSocket handshake can send an unterminated fragmented
message and drive unbounded heap growth in the server JVM, resulting in
denial of service via OutOfMemoryError.

Impact

Any http4s application serving WebSocket routes over
BlazeServerBuilder is affected; no non-default configuration is required,
and maxWebSocketBufferSize does not bound the aggregate (it bounds only
individual frames). A single connection sending continuation frames that
never set FIN forces the server to buffer every fragment until the heap is
exhausted, terminating the JVM with OutOfMemoryError on the blaze
selector thread. Small fragments amplify the cost through per-frame object
overhead, so a modest volume of wire bytes is sufficient. Where the
WebSocket endpoint is reachable without authentication the attacker is
unauthenticated and remote; where the handshake requires a principal, any
authenticated client can still trigger it.

Workarounds

  • No blaze-server configuration bounds the aggregate; maxWebSocketBufferSize
    is not a mitigation.
  • Terminate/limit WebSocket traffic at a fronting layer that enforces
    message-size and fragment limits, or disable WebSocket routes.
  • Longer term: blaze is EOL upstream; plan migration to a maintained
    backend (e.g. ember).

References

@rossabaker rossabaker published to http4s/blaze Jul 23, 2026
Published to the GitHub Advisory Database Jul 24, 2026
Reviewed Jul 24, 2026
Last updated Jul 24, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS score

Weaknesses

Allocation of Resources Without Limits or Throttling

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-7ppr-r889-mcf2

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.