CVE-2023-2850: NodeBB cross-origin WebSocket session hijacking

CVE-2023-2850 · Severity: low · CVSS 3.1 · Published 2023-07-25

NodeBB is a popular Node.js-based forum platform that uses WebSockets for real-time communication between the server and clients. An attacker can hijack a user's WebSocket session by tricking them into visiting a malicious website while they are logged into a NodeBB forum. This allows the attacker to intercept and read the victim's private messages and posts without requiring valid credentials.

Technologies: NodeBB. Vendors: NodeBB.

Quick answers

Is CVE-2023-2850 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2023-2850 being exploited in the wild.
How severe is CVE-2023-2850?
Low severity, with a CVSS score of 3.1, published 25 July 2023.
Which products and versions are affected?
NodeBB 3.0.0 - 3.1.2, < 2.8.13.
Is there a fix for CVE-2023-2850?
A patch was published on 2023-05-15: Fixed in NodeBB v3.1.3 and v2.8.13 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2023-2850 attacked?
It is attacked over the network, in a web application.
Am I affected by CVE-2023-2850?
Check whether you run NodeBB at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is a missing origin validation flaw (CWE-1385, CWE-346) in the WebSocket handshake process. NodeBB did not validate CSRF tokens during WebSocket connection establishment, allowing cross-origin requests to hijack active sessions. An attacker on a different domain can initiate a WebSocket connection to the target NodeBB server using the victim's authenticated browser session (which automatically includes the session cookie). The fix involves sending a CSRF token as a query parameter during the WebSocket handshake and validating it server-side to ensure the connection originates from the legitimate NodeBB domain. No user interaction beyond visiting a malicious page is required to trigger the vulnerability; the attack is performed automatically via JavaScript.

Affected products

  • NodeBB NodeBB 3.0.0 - 3.1.2, < 2.8.13

Identifiers

  • CVE-2023-2850
  • GHSA-4qcv-qf38-5j3j

Timeline

  • 2023-07-25: disclosed: Vulnerability publicly disclosed
  • 2023-05-15: patched: Fixed in NodeBB v3.1.3 and v2.8.13

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.