Miggo Logo

CVE-2022-46164: NodeBB vulnerable to account takeover via prototype vulnerability

9.4

CVSS Score
3.1

Basic Information

EPSS Score
0.98208%
Published
12/5/2022
Updated
1/31/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
nodebbnpm< 2.6.12.6.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the initialization of the 'Namespaces' object as a plain object with a prototype ({}). The commit fixes this by using Object.create(null), which creates a prototype-less object. The associated CWE-665 (Improper Initialization) and the patch's focus on socket.io's onMessage handling confirm that the message handler relied on this vulnerable object. Prototype pollution in this context allows attackers to inject malicious properties into the Namespaces object, leading to authentication bypass.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t *u* to * pl*in o*j**t wit* * prototyp* **in* us** in so*k*t.io m*ss*** **n*lin* * sp**i*lly *r**t** p*ylo** **n ** us** to imp*rson*t* ot**r us*rs *n* t*k*ov*r ***ounts. ### P*t***s P*t**** in *.*.* ### Work*roun*s Sit* m*int*in*rs **n *

Reasoning

T** vuln*r**ility st*ms *rom t** initi*liz*tion o* t** 'N*m*sp***s' o*j**t *s * pl*in o*j**t wit* * prototyp* ({}). T** *ommit *ix*s t*is *y usin* `O*j**t.*r**t*(null)`, w*i** *r**t*s * prototyp*-l*ss o*j**t. T** *sso*i*t** *W*-*** (Improp*r Initi*li