CVE-2016-10518
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-201: Insertion of Sensitive Information Into Sent Data
Timeline
- 2018-05-31Published by the CNA20:00 UTC
- 2019-02-18GitHub advisory published (GHSA-2mhh-w6q8-5hxw)263 days after publication
Exploit and advisory records
GitHub advisory GHSA-2mhh-w6q8-5hxw, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm ws | before 1.0.1 | 1.0.1 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| ws_project ws | before 1.0.1fixed in 1.0.1 | 1.0.1 |
References
- https://gist.github.com/c0nrad/e92005446c480707a74a
- https://github.com/websockets/ws/releases/tag/1.0.1
- https://nodesecurity.io/advisories/67
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2016-10518'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2016-10518'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2016-10518'curl 'https://api.contrastcyber.com/cve_products/CVE-2016-10518'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).