@nestjs/platform-socket.io is vulnerable to Uncaught Exception
59
CVE Score
Medium
Uncaught Exception
IoAdapter.bindMessageHandlers and WsAdapter.bindMessageHandlers send gateway handler responses through socket.emit(), ack(), or JSON.stringify() and client.send() inside an RxJS subscriber, with nothing to catch a throw. A client Socket.IO or WebSocket message that the handler echoes can be nested deeply enough that parsing succeeds while the encoder or JSON.stringify throws. RxJS then re-raises that exception asynchronously and can crash the Node process. The fix catches those serialization throws and logs them, so the reply is dropped and the process keeps running.
Upgrade the @nestjs/platform-socket.io and/or the @nestjs/platform-ws library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your gateway handlers can produce responses derived from client-supplied data over the WebSocket or Socket.IO adapter.
6.0.0 - 11.2.6
Fixed in 11.2.712.0.0 - 12.1.1
Fixed in 12.1.2@nestjs/platform-socket.io is vulnerable to Uncaught Exception in versions 6.0.0 - 11.2.6 and 12.0.0 - 12.1.1.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.