{"id":"CVE-2017-16031","aliases":["EUVD-2018-0772","GHSA-qv2v-m59f-v5fw"],"status":"published","title":"Insecure randomness in socket.io","description":"Socket.io is a realtime application framework that provides communication via websockets. Because socket.io 0.9.6 and earlier depends on `Math.random()` to create socket IDs, the IDs are predictable. An attacker is able to guess the socket ID and gain access to socket.io servers, potentially obtaining sensitive information.","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.01969,"percentile":0.80535,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-330"],"published":"2018-06-04T19:00:00Z","modified":"2026-10-20T10:48:16Z","fixes":[{"ecosystem":"npm","package":"socket.io","fixed_in":["0.9.7"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"socket.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.9.6"},{"fixed":"0.9.7"}]}]},{"source":"osv","ecosystem":"npm","package":"socket.io","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.9.7"}]}]}],"products":[{"vendor":"hackerone","product":"socket.io node module"},{"vendor":"socket","product":"socket.io"}],"references":[{"url":"https://github.com/socketio/socket.io/commit/67b4eb9abdf111dfa9be4176d1709374a2b4ded8","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/socketio/socket.io/issues/856","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://github.com/socketio/socket.io/pull/857","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://nodesecurity.io/advisories/321","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-16031","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-qv2v-m59f-v5fw","tags":["advisory"]},{"url":"https://www.npmjs.com/advisories/321","tags":["web"]},{"url":"https://github.com/socketio/socket.io","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2017-16031","description":"Socket.io is a realtime application framework that provides communication via websockets. Because socket.io 0.9.6 and earlier depends on `Math.random()` to create socket IDs, the IDs are predictable. An attacker is able to guess the socket ID and gain access to socket.io servers, potentially obtaining sensitive information.","status":"published","published":"2018-06-04T19:00:00Z","modified":"2024-09-16T21:07:25.207Z","updated_at":"2026-11-02T14:33:21.142987Z"}],"euvd":[{"id":"EUVD-2018-0772","description":"Socket.io is a realtime application framework that provides communication via websockets. Because socket.io 0.9.6 and earlier depends on `Math.random()` to create socket IDs, the IDs are predictable. An attacker is able to guess the socket ID and gain access to socket.io servers, potentially obtaining sensitive information.","status":"published","published":"2018-06-04T19:00:00Z","modified":"2024-09-16T21:07:25Z","updated_at":"2026-11-03T00:55:08.067702Z"}],"ghsa":[{"id":"GHSA-qv2v-m59f-v5fw","title":"Insecure randomness in socket.io","description":"Affected versions of `socket.io` depend on `Math.random()` to create socket IDs, and therefore the IDs are predictable. With enough information on prior IDs, an attacker may be able to guess the socket ID and gain access to socket.io servers without authorization.\n\n\n## Recommendation\n\nUpdate to v0.9.7 or later.","status":"published","published":"2018-11-07T00:29:37Z","modified":"2023-01-09T05:03:35Z","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"}],"cwes":["CWE-330"],"updated_at":"2026-11-02T14:36:05.705235Z"}],"nvd":[{"id":"CVE-2017-16031","description":"Socket.io is a realtime application framework that provides communication via websockets. Because socket.io 0.9.6 and earlier depends on `Math.random()` to create socket IDs, the IDs are predictable. An attacker is able to guess the socket ID and gain access to socket.io servers, potentially obtaining sensitive information.","status":"published","published":"2018-06-04T19:29:01.727Z","modified":"2026-06-17T01:08:41.283Z","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-330"],"updated_at":"2026-11-02T14:04:17.638656Z"}],"osv":[{"id":"CVE-2017-16031","description":"Socket.io is a realtime application framework that provides communication via websockets. Because socket.io 0.9.6 and earlier depends on `Math.random()` to create socket IDs, the IDs are predictable. An attacker is able to guess the socket ID and gain access to socket.io servers, potentially obtaining sensitive information.","status":"published","published":"2018-06-04T19:29:01.727Z","modified":"2026-10-20T10:48:16.171658948Z","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:04.853379Z"},{"id":"GHSA-qv2v-m59f-v5fw","title":"Insecure randomness in socket.io","description":"Affected versions of `socket.io` depend on `Math.random()` to create socket IDs, and therefore the IDs are predictable. With enough information on prior IDs, an attacker may be able to guess the socket ID and gain access to socket.io servers without authorization.\n\n\n## Recommendation\n\nUpdate to v0.9.7 or later.","status":"published","published":"2018-11-07T00:29:37Z","modified":"2023-11-08T03:59:00.679957Z","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"}],"cwes":["CWE-330"],"updated_at":"2026-11-02T15:46:55.122811Z"}]}}
