CVE-2017-16031
Insecure randomness in socket.io
Also known as GHSA-qv2v-m59f-v5fw
Mitigation
- Upgrade socket.io to 0.9.7 or later.
Who should check
- Projects that depend on npm package socket.io (< 0.9.7)
- Anyone running HackerOne socket.io node module <=0.9.6
Vulnerability facts
- Affected
- socket.io < 0.9.7
- Fixed in
- 0.9.7
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v3.0, NVD)CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 1.93% chance of exploitation in 30 days (percentile 81, 2026-11-26)
- CWE
- CWE-330
- Modified
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2017-16031. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2017-16031.md Affected: socket.io < 0.9.7 Fixed in: 0.9.7 Steps: 1. Search this machine and project for socket.io (npm), HackerOne socket.io node module: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2017-16031 being exploited?
There is no confirmed exploitation: CVE-2017-16031 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.93% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2017-16031?
High: CVSS 7.5 (v3.0, scored by NVD). Remote, no login needed.
Which versions are affected by CVE-2017-16031?
socket.io < 0.9.7.
Is there a fix for CVE-2017-16031?
Yes. Fixed in 0.9.7. Upgrade socket.io to 0.9.7 or later.
How do I check if I'm affected by CVE-2017-16031?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.