CVE-2022-36076: Nodebb NodeBB Account Takeover Vulnerability

HIGH
Advisory Identifier: GHSA-xmgg-fx9p-prq6
CVSS 7.5
CWE-352
Published
Advisory Summary

CVE-2022-36076 is a HIGH (CVSS 7.5) nodebb account takeover vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Nodebb libraries in the npm ecosystem. The issue involves nodebb account takeover via sso plugins. Remediation is available by upgrading affected packages to version 1.17.2.

CVE-2022-36076 at a Glance

CVE Identifier CVE-2022-36076
GHSA Identifier GHSA-xmgg-fx9p-prq6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Nodebb
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-36076

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.

nodebb fixed: 1.17.2
npm install nodebb@1.17.2
Verify Direct and Transitive Dependencies

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-36076, 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 1.17.2), 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. 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

_This is a historical security advisory, pertaining to a vulnerability that was reported, patched, and published in 2021. It is listed here for completeness and for CVE tracking purposes._ ### Impact Due to an unnecessarily strict conditional in the code handling the first step of the SSO process, the pre-existing logic that added (and later checked) a nonce was inadvertently rendered opt-in instead of opt-out. This re-exposed a vulnerability in that a specially crafted MITM attack could theoretically take over another user account during the single sign-on process. ### Patches The issue has been fully patched as of v1.17.2. The patch commit can be found at https://github.com/NodeBB/NodeBB/commit/a2400f6baff44cb2996487bcd0cc6e2acc74b3d4 ### Workarounds Site maintainers can cherry-pick https://github.com/NodeBB/NodeBB/commit/a2400f6baff44cb2996487bcd0cc6e2acc74b3d4 into their codebase to patch the exploit. ### References * https://blogs.opera.com/security/2022/03/bug-bounty-adventures-a-nodebb-0-day/ ### For more information If you have any questions or comments about this advisory: * Discuss it on [our community forum](community.nodebb.org/) * Email us at [support@nodebb.org](mailto:support@nodebb.org)

CVE-2022-36076 Affected Nodebb Versions

1 component(s)
Fixed Versions:
1.17.2
Product / Package Ecosystem Affected Versions Fixed Version
nodebb
npm
< 1.17.2
1.17.2

References

Frequently Asked Questions

What is CVE-2022-36076?
CVE-2022-36076 is a security vulnerability in Nodebb involving NodeBB account takeover via SSO plugins under CWE-352: Cross-Site Request Forgery (CSRF).
Which Nodebb versions are affected?
Affected versions include releases prior to 1.17.2 across affected packages: nodebb.
What version fixes CVE-2022-36076?
Upgrading to 1.17.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nodebb affected?
Yes, nodebb is affected in releases prior to 1.17.2. Upgrade your dependency to 1.17.2 or later.
What is the CVSS score of CVE-2022-36076?
CVE-2022-36076 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-36076?
CVE-2022-36076 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check npm dependencies for CVE-2022-36076?
Run the dependency tree command: 'npm ls nodebb'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xmgg-fx9p-prq6",
  "modified" : "2022-09-16T18:38:45Z",
  "published" : "2022-09-16T18:38:45Z",
  "aliases" : [ "CVE-2022-36076" ],
  "summary" : "NodeBB account takeover via SSO plugins",
  "details" : "_This is a historical security advisory, pertaining to a vulnerability that was reported, patched, and published in 2021. It is listed here for completeness and for CVE tracking purposes._\n\n### Impact\nDue to an unnecessarily strict conditional in the code handling the first step of the SSO process, the pre-existing logic that added (and later checked) a nonce was inadvertently rendered opt-in instead of opt-out.\n\nThis re-exposed a vulnerability in that a specially crafted MITM attack could theoretically take over another user account during the single sign-on process.\n\n### Patches\nThe issue has been fully patched as of v1.17.2.\n\nThe patch commit can be found at https://github.com/NodeBB/NodeBB/commit/a2400f6baff44cb2996487bcd0cc6e2acc74b3d4\n\n### Workarounds\nSite maintainers can cherry-pick https://github.com/NodeBB/NodeBB/commit/a2400f6baff44cb2996487bcd0cc6e2acc74b3d4 into their codebase to patch the exploit.\n\n### References\n* https://blogs.opera.com/security/2022/03/bug-bounty-adventures-a-nodebb-0-day/\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Discuss it on [our community forum](community.nodebb.org/)\n* Email us at [support@nodebb.org](mailto:support@nodebb.org)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nodebb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.17.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.17.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/NodeBB/NodeBB/security/advisories/GHSA-xmgg-fx9p-prq6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36076"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NodeBB/NodeBB/commit/a2400f6baff44cb2996487bcd0cc6e2acc74b3d4"
  }, {
    "type" : "WEB",
    "url" : "https://blogs.opera.com/security/2022/03/bug-bounty-adventures-a-nodebb-0-day"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/NodeBB/NodeBB"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-16T18:38:45Z",
    "nvd_published_at" : "2022-09-02T13:15:00Z"
  }
}