CVE-2017-16031 json
Insecure randomness in socket.io
published 2018-06-04 8 y ago modified 2026-06-17 4 mo ago also GHSA-qv2v-m59f-v5fw , EUVD-2018-0772
- cvss
- 7.5
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.0%
- EPSS 2.0% chance of exploitation in 30 days, percentile 80%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm socket.io 0.9.7
- github.com/socketio/socket.io@67b4eb9 commit
- github.com/socketio/socket.io#857 pull request
Exploit prediction
1.97% chance of exploitation in the next 30 days, higher than 80% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.0 | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | socket.io | <0.9.7 |
0.9.7 |
Affected products
- HackerOne socket.io node module
Classification
- Weakness
-
- CWE-330 Use of Insufficiently Random Values
References
-
github.com
/socketio/socket.io/commit/67b4eb9abdf111dfa9be4176d1709374a2b4ded8
web, issue-tracking, patch, third-party-advisory
-
github.com
/socketio/socket.io/pull/857
web, issue-tracking, third-party-advisory
-
github.com
/socketio/socket.io/issues/856
web, issue-tracking, third-party-advisory
-
nodesecurity.io
/advisories/321
third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2017-16031
advisory
-
github.com
/advisories/GHSA-qv2v-m59f-v5fw
advisory
-
github.com
/socketio/socket.io
package
-
npmjs.com
/advisories/321
web
Sources
- CVE List CVE-2017-16031
- GitHub Advisory GHSA-qv2v-m59f-v5fw
- NVD CVE-2017-16031
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.