# GHSA-M25W-Q28W-J8FP: Process crash via a large WebSocket message to a WsAdapter gateway

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-11-12
- Modified: 2026-11-12

## Affected versions

- @nestjs/platform-ws (npm): from 12.0.0, fixed in 12.5.0
- @nestjs/platform-ws (npm): fixed in 11.2.10

## Description

| Field | Value |
| --- | --- |
| Ecosystem | npm |
| Package | `@nestjs/platform-ws` |
| Affected versions | `< 11.2.10` and `>= 12.0.0, < 12.5.0` |
| Patched versions | `11.2.10` and `12.5.0` |
| Severity | High |
| CVSS v3.1 | `AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H` (7.5) |
| CWE | CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-400 (Uncontrolled Resource Consumption) |

### Summary

`WsAdapter` accepted client messages of up to 100 MiB, the `ws` library's default, and parsed each message whole before any handler or guard ran. A single large message from any client that could open a connection could exhaust the heap and terminate the process.

### Impact

Applications that use `@nestjs/platform-ws` (`app.useWebSocketAdapter(new WsAdapter(app))`) without a `maxPayload` in their gateway options are affected. No authentication is needed unless the connection is refused at the upgrade. The default Socket.IO adapter is not affected: engine.io limits messages to 1 MB by default.

### Patches

Fixed in **11.2.10** and **12.5.0**. `WsAdapter` now limits client messages to 1 MB by default and closes a connection that sends a larger one with code 1009. A gateway's own `maxPayload` still takes precedence, and the new `maxPayload` option of the adapter changes the default.

### Workarounds

Set `maxPayload` in the options of each `@WebSocketGateway()`.

### Credit

Reported by Anthropic's OSS Scanner.

## References

- https://github.com/nestjs/nest/security/advisories/GHSA-m25w-q28w-j8fp

Page: https://cve.now/GHSA-M25W-Q28W-J8FP

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
