Out-of-Bounds Affecting node-ws package, versions <1.0.1+ds1.e6ddaae4-1


Severity

Recommended
low

Based on Debian security rating.

Threat Intelligence

EPSS
0.15% (53rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN13-NODEWS-5690625
  • published31 May 2018
  • disclosed31 May 2018

Introduced: 31 May 2018

CVE-2016-10518  (opens in a new tab)
CWE-119  (opens in a new tab)

How to fix?

Upgrade Debian:13 node-ws to version 1.0.1+ds1.e6ddaae4-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream node-ws package and not the node-ws package as distributed by Debian. See How to fix? for Debian:13 relevant fixed versions and status.

A vulnerability was found in the ping functionality of the ws module before 1.0.0 which allowed clients to allocate memory by sending a ping frame. The ping functionality by default responds with a pong frame and the previously given payload of the ping frame. This is exactly what you expect, but internally ws always transforms all data that we need to send to a Buffer instance and that is where the vulnerability existed. ws didn't do any checks for the type of data it was sending. With buffers in node when you allocate it when a number instead of a string it will allocate the amount of bytes.