NodeBB: Improper Initialization
CVE-2022-46164 is a critical-severity improper initialization vulnerability in NodeBB, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected NodeBB versions: < 2.6.1. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 47.4% chance of exploitation within 30 days, which is in the top 1.14% of all scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of NodeBB you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.4 | Critical | CNA (github.com) |
| CVSS 3.1 | 9.8 | Critical | NVD |
Official description
NodeBB is an open source Node.js based forum software. Due 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. This vulnerability has been patched in version 2.6.1. Users are advised to upgrade. Users unable to upgrade may cherry-pick commit `48d143921753914da45926cca6370a92ed0c46b8` into their codebase to patch the exploit.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Initialization
The product does not initialize or incorrectly initializes a resource.
How developers prevent this class of flaw
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, in Java, if the programmer does not explicitly initialize a variable, then the code could produce a compile-time error (if the variable is local) or automatically initialize the variable to the default value for the variable's type. In Perl, if explicit initialization is not performed, then a default value of undef is assigned, which is interpreted as 0, false, or an equivalent value depending on the context in which the variable is accessed.
- Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
- Explicitly initialize all your variables and other data stores, either during declaration or just before the first usage.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/NodeBB/NodeBB/security/advisories/GHSA-rf3g-v8p5-p675Third Party Advisory
Patches and release notes
- github.com/NodeBB/NodeBB/commit/48d143921753914da45926cca6370a92ed0c46b8Third Party Advisory
Other vulnerabilities in NodeBB
- 7.5 High severity
- 8.6 High severity
- 7.5 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 7.5 High severity
Recent Improper Initialization vulnerabilities
- 7.8 High severity
- 9.8 Critical severity
- 7.2 High severity
- 7.8 High severity
- 8.8 High severity
- 8.8 High severity
Spotted an error? Tell us.