CVE-2022-46164: Nodebb NodeBB Vulnerable To Account Takeover Vulnerability
CRITICALCVE-2022-46164 is a CRITICAL (CVSS 9.4) nodebb vulnerable to account takeover vulnerability (CWE-665: Improper Initialization) affecting Nodebb libraries in the npm ecosystem. The issue involves nodebb vulnerable to account takeover via prototype vulnerability. Remediation is available by upgrading affected packages to version 2.6.1.
CVE-2022-46164 at a Glance
Security Impact
CVSS: 9.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L).
How to Fix CVE-2022-46164
To remediate this vulnerability, upgrade all affected Nodebb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install nodebb@2.6.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls nodebb
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-46164, inspect your project dependencies using npm:
npm ls nodebb
Analyze the terminal output to locate any version of Nodebb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.1), your application is affected.
Note: The npm ls nodebb command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-665: Improper Initialization, where the product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used. In Nodebb, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-46164 Affected Nodebb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nodebb
|
npm |
< 2.6.1
|
2.6.1
|
References
Frequently Asked Questions
What is CVE-2022-46164?
Which Nodebb versions are affected?
What version fixes CVE-2022-46164?
Is nodebb affected?
What is the CVSS score of CVE-2022-46164?
What CWE is associated with CVE-2022-46164?
How can I check npm dependencies for CVE-2022-46164?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rf3g-v8p5-p675",
"modified" : "2022-12-05T23:06:14Z",
"published" : "2022-12-05T23:06:14Z",
"aliases" : [ "CVE-2022-46164" ],
"summary" : "NodeBB vulnerable to account takeover via prototype vulnerability",
"details" : "### Impact\nDue to a plain object with a prototype being used in socket.io message handling a specially crafted payload can be used to impersonate other users and takeover accounts.\n\n### Patches\nPatched in 2.6.1\n\n### Workarounds\nSite maintainers can cherry-pick https://github.com/NodeBB/NodeBB/commit/48d143921753914da45926cca6370a92ed0c46b8 into their codebase to patch the exploit.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\nDiscuss it on [our community forum](https://github.com/NodeBB/NodeBB/security/advisories/community.nodebb.org/)\nEmail us at [support@nodebb.org](mailto:support@nodebb.org)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "nodebb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.6.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/NodeBB/NodeBB/security/advisories/GHSA-rf3g-v8p5-p675"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-46164"
}, {
"type" : "WEB",
"url" : "https://github.com/NodeBB/NodeBB/commit/48d143921753914da45926cca6370a92ed0c46b8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/NodeBB/NodeBB"
}, {
"type" : "WEB",
"url" : "https://github.com/NodeBB/NodeBB/releases/tag/v2.6.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-665" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-05T23:06:14Z",
"nvd_published_at" : "2022-12-05T21:15:00Z"
}
}