CVE-2022-36045
Description
NodeBB Forum Software is powered by Node.js and supports either Redis, MongoDB, or a PostgreSQL database. It utilizes web sockets for instant interactions and real-time notifications. `utils.generateUUID`, a helper function available in essentially all versions of NodeBB (as far back as v1.0.1 and potentially earlier) used a cryptographically insecure Pseudo-random number generator (`Math.random()`), which meant that a specially crafted script combined with multiple invocations of the password reset functionality could enable an attacker to correctly calculate the reset code for an account they do not have access to. This vulnerability impacts all installations of NodeBB. The vulnerability allows for an attacker to take over any account without the involvement of the victim, and as such, the remediation should be applied immediately (either via NodeBB upgrade or cherry-pick of the specific changeset. The vulnerability has been patched in version 2.x and 1.19.x. There is no known workaround, but the patch sets listed above will fully patch the vulnerability.
Weakness
- CWE-330: Use of Insufficiently Random Values
- CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2025-04-23 |
Timeline
- 2022-08-30GitHub advisory published (GHSA-p4cc-w597-6cpm)1 day before publication
- 2022-08-31Published by the CNA15:10 UTC
- 2025-04-23CISA SSVC decision recorded966 days after publication
Exploit and advisory records
GitHub advisory GHSA-p4cc-w597-6cpm, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm nodebb | before 1.19.8 | 1.19.8 |
| npm nodebb | from 2.0.0 before 2.0.1 | 2.0.1 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| nodebb nodebb | before 1.19.8fixed in 1.19.82.0.0no fix listed | 1.19.8not listed |
References
- https://github.com/NodeBB/NodeBB/commit/81e3c1ba488d03371a5ce8d0ebb5c5803026e0f9
- https://github.com/NodeBB/NodeBB/commit/e802fab87f94a13f397f04cfe6068f2f7ddf7888
- https://github.com/NodeBB/NodeBB/security/advisories/GHSA-p4cc-w597-6cpm
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2022-36045'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2022-36045'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2022-36045'curl 'https://api.contrastcyber.com/cve_products/CVE-2022-36045'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).