VDB
KO
HIGH 7.5

GHSA-2m8v-j782-fhvr

Socket.IO: Zero-attachment Memory Exhaustion

Quick fix

GHSA-2m8v-j782-fhvr — socket.io-parser: upgrade to the fixed version with the command below.

npm install socket.io-parser@4.2.7

Details

### Impact

A specially crafted Socket.IO packet can make the server wait for a large number of binary attachments and buffer them, which can be exploited to make the server run out of memory.

### Patches

| Version range | Used by | Fixed version | |------------------|--------------------------------------------|---------------| | `>=4.0.0 <4.2.7` | `socket.io@4.x` and `socket.io-client@4.x` | `4.2.7` | | `>=3.4.0 <3.4.5` | `socket.io@2.x` | `3.4.5` | | `<3.3.6` | `socket.io-client@2.x` | `3.3.6` |

### Workarounds

There is no known workaround except upgrading to a safe version.

### For more information

If you have any questions or comments about this advisory:

- Open a discussion [here](https://github.com/socketio/socket.io/discussions)

Are you affected?

Enter the version of the package you're using.

Affected packages

npm / socket.io-parser
Introduced in: 4.0.0 Fixed in: 4.2.7
Fix npm install socket.io-parser@4.2.7
npm / socket.io-parser
Introduced in: 3.4.0 Fixed in: 3.4.5
Fix npm install socket.io-parser@3.4.5
npm / socket.io-parser
Introduced in: 0 Fixed in: 3.3.6
Fix npm install socket.io-parser@3.3.6

References