CVE-2016-10518 Remote Memory Disclosure in ws

High 7.5 Published Updated

Attackers can cause denial of service in the ws Node.js library by sending ping frames that trigger excessive memory allocation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2016-10518?

CVE-2016-10518 is a high-severity denial of service vulnerability in HackerOne ws node module, published on 31 May 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-119, CWE-201

Which versions are affected by CVE-2016-10518?

2 open source packages ship an affected version, including ws. It affects 1 product.

PackageAffectedFixed in
ws npmAll versions1.0.1
ws npmAll versions1.0.1

Products include Ws Project Ws.

How do I fix CVE-2016-10518?

Upgrade ws to 1.0.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2016-10518 being exploited?

There is no known exploitation of CVE-2016-10518 in the wild and no public exploit code.

Sources

Also known as CLSA-2026-1784596272, DEBIAN-CVE-2016-10518, GHSA-2mhh-w6q8-5hxw, MINI-34m9-8mxh-7cxg, MINI-chmh-66jf-4pqx, UBUNTU-CVE-2016-10518.

Is CVE-2016-10518 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free