---
id: "GHSA-pqx8-96w4-q4w8"
page: "https://infrastack.ai/live/GHSA-pqx8-96w4-q4w8"
kind: "vulnerability"
aliases: ["GHSA-pqx8-96w4-q4w8"]
title: "Process crash via Socket.IO error replies that echo a message's binary data"
severity: "high"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@nestjs/websockets", "fixed": ["12.5.0"], "affected": ">= 12.0.0, < 12.5.0", "ecosystem": "npm"}, {"name": "@nestjs/websockets", "fixed": ["11.2.10"], "affected": ">= 11.0.0, < 11.2.10", "ecosystem": "npm"}, {"name": "@nestjs/platform-socket.io", "fixed": ["12.5.0"], "affected": ">= 12.0.0, < 12.5.0", "ecosystem": "npm"}, {"name": "@nestjs/platform-socket.io", "fixed": ["11.2.10"], "affected": ">= 11.0.0, < 11.2.10", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-400", "cwe-405", "nestjs", "node", "package", "socket.io", "websockets"]
not_affected_if: ["custom-exception-filter", "includecause-false", "no-websockets"]
published_at: "2026-11-12T19:03:51+00:00"
first_seen_at: "2026-11-12T19:14:24+00:00"
updated_at: "2026-11-12T19:15:45+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/nestjs/nest/security/advisories/GHSA-pqx8-96w4-q4w8", "first_seen_at": "2026-11-12T19:14:24+00:00"}]
exploit_sources: []
---

# Process crash via Socket.IO error replies that echo a message's binary data

Link for people: https://infrastack.ai/live/GHSA-pqx8-96w4-q4w8 (this .md is for agents)

The default WebSocket exception filter in NestJS echoes a failed message's data back in its error reply, and with the Socket.IO adapter a crafted binary message can make that reply much larger than the message itself. Sending it can exhaust memory and terminate the Node.js process, and no login is needed.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@nestjs/websockets affected >= 12.0.0, < 12.5.0 fixed 12.5.0
- npm:@nestjs/websockets affected >= 11.0.0, < 11.2.10 fixed 11.2.10
- npm:@nestjs/platform-socket.io affected >= 12.0.0, < 12.5.0 fixed 12.5.0
- npm:@nestjs/platform-socket.io affected >= 11.0.0, < 11.2.10 fixed 11.2.10

## How to check

- Check the installed versions with `npm ls @nestjs/websockets @nestjs/platform-socket.io`
- Look for WebSocket gateways that use the default exception filter or a filter extending `BaseWsExceptionFilter` with `includeCause` left on
- Confirm whether the app uses the default Socket.IO adapter

## Fix

- `@nestjs/websockets`: `11.2.10` on the 11.x line, `12.5.0` on the 12.x line
- `@nestjs/platform-socket.io`: `11.2.10` on the 11.x line, `12.5.0` on the 12.x line
- Workaround from the advisory: an exception filter extending `BaseWsExceptionFilter` with `includeCause: false`

## Timeline

- 2026-11-12T19:14:24+00:00 ghsa-repo https://github.com/nestjs/nest/security/advisories/GHSA-pqx8-96w4-q4w8

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/nestjs/nest/security/advisories/GHSA-pqx8-96w4-q4w8

## From the sources

| Field | Value |
| --- | --- |
| Ecosystem | npm |
| Package | `@nestjs/websockets`, `@nestjs/platform-socket.io` |
| Affected versions | `>= 11.0.0, < 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-405 (Asymmetric Resource Consumption (Amplification)), CWE-400 (Uncontrolled Resource Consumption) |

### Summary

By default, the WebSocket exception filter includes the data of the message that failed in its error reply. With the Socket.IO adapter, a crafted message with binary data could make that reply far larger than the message itself, and sending it could exhaust memory or terminate the process.

### Impact

Applications using the default Socket.IO adapter and the default WebSocket exception filter (or one that extends `BaseWsExceptionFilter` and keeps `includeCause`) are affected when any message handler can fail for a client, for example because a guard refuses it or a pipe rejects the payload. No authentication is needed.

### Patches

Fixed in **11.2.10** and **12.5.0**. The default filter leaves binary data out of the cause of its error replies, and `IoAdapter` disconnects a client whose message refers to the same binary value more than once. Upgrade both `@nestjs/websockets` and `@nestjs/platform-socket.io`.

### Workarounds

Use an exception filter that does not include the cause, for example one that extends `BaseWsExceptionFilter` with `includeCause: false`.

### Credit

Reported by Anthropic's OSS Scanner.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
