CVE-2016-10518 Remote Memory Disclosure in ws
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.
Which versions are affected by CVE-2016-10518?
2 open source packages ship an affected version, including ws. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
ws npm | All versions | 1.0.1 |
ws npm | All versions | 1.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.
Other vulnerabilities in HackerOne ws node module
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.