Miggo Logo

CVE-2017-16031:
Insecure randomness in socket.io

7.5

CVSS Score
3.0

Basic Information

EPSS Score
0.60273%
Published
11/7/2018
Updated
1/9/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
socket.ionpm<= 0.9.60.9.7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the insecure use of Math.random() in the ID generation process. The commit 67b4eb9 explicitly replaces Math.random() with crypto.randomBytes in Manager.prototype.generateId, confirming this was the vulnerable function. The CWE-330 classification and advisory descriptions directly match this pattern of insufficient randomness in cryptographic identifiers.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*****t** v*rsions o* `so*k*t.io` **p*n* on `M*t*.r*n*om()` to *r**t* so*k*t I*s, *n* t**r**or* t** I*s *r* pr**i*t**l*. Wit* *nou** in*orm*tion on prior I*s, *n *tt**k*r m*y ** **l* to *u*ss t** so*k*t I* *n* **in ****ss to so*k*t.io s*rv*rs wit*out

Reasoning

T** vuln*r**ility st*ms *rom t** ins**ur* us* o* M*t*.r*n*om() in t** I* **n*r*tion pro**ss. T** *ommit ******* *xpli*itly r*pl***s M*t*.r*n*om() wit* *rypto.r*n*om*yt*s in M*n***r.prototyp*.**n*r*t*I*, *on*irmin* t*is w*s t** vuln*r**l* *un*tion. T*