Improper Handling of Length Parameter Inconsistencyorg.mvnpm:websocket-driver is a websocket protocol handler with pluggable I/O.
Affected versions of this package are vulnerable to Improper Handling of Length Parameter Inconsistency through the hybi.js WebSocket frame processing in lib/websocket/driver. An attacker can corrupt how the server parses a message by sending a draft WebSocket frame with a length header made of an indefinite run of bytes with the high bit set, causing the parsed length to grow past the configured maximum. As the parser accumulates that oversized length into a JavaScript number, precision is lost and the following payload is decoded incorrectly, breaking message handling on the server and delivering malformed data to the application.
How to fix Improper Handling of Length Parameter Inconsistency? Upgrade org.mvnpm:websocket-driver to version 0.7.5 or higher.
| |
Allocation of Resources Without Limits or Throttlingorg.mvnpm:websocket-driver is a websocket protocol handler with pluggable I/O.
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via message compression through the hybi message handling in lib/websocket/driver/hybi.js. An attacker can make a WebSocket server or client accept oversized messages by sending compressed permessage-deflate frames whose post-decompression payload exceeds the configured maximum length. The length check is applied to the frame data before extension processing, so the application enforces the limit on compressed input rather than the expanded message. This can let attacker-supplied messages consume more memory and processing than intended, causing resource exhaustion or other breakage in deployments that rely on the max-message-size setting.
Notes
- Affected deployments are the ones that negotiate
permessage-deflate; the bypass is in the post-extension message path, so the configured max-length setting is only meaningful for traffic that is actually processed through that extension chain.
- The issue can affect both servers and clients using the library, since the length check sits in the shared
hybi message handling path rather than in a server-only code path.
How to fix Allocation of Resources Without Limits or Throttling? Upgrade org.mvnpm:websocket-driver to version 0.7.5 or higher.
| |
Data Amplificationorg.mvnpm:websocket-driver is a websocket protocol handler with pluggable I/O.
Affected versions of this package are vulnerable to Data Amplification in the inflate handling in lib/session.js, which fully decompresses an incoming WebSocket frame before any size check and does not receive the maxLength limit configured on websocket-driver or faye-websocket. An unauthenticated remote client that negotiates the permessage-deflate extension can send a small, highly compressible message of one repeated byte, around 1/1000 of its decompressed size, and force the server to allocate a buffer about 1000 times the received frame, bypassing the configured limit and crashing the process when memory runs out. This affects any server whose WebSocket stack adds the permessage-deflate extension, and full remediation requires upgrading websocket-extensions and websocket-driver as well so the maxLength option is forwarded to the extension.
How to fix Data Amplification? A fix was pushed into the master branch but not yet published.
| |