CVE-2025-50979: Nodebb SQL Injection Vulnerability

HIGH
Advisory Identifier: GHSA-rfh2-8vxq-jqr8
CWE-89
Published
Advisory Summary

CVE-2025-50979 is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Nodebb libraries in the npm ecosystem. The issue involves nodebb sql injection vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2025-50979 at a Glance

CVE Identifier CVE-2025-50979
GHSA Identifier GHSA-rfh2-8vxq-jqr8
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Nodebb
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-50979

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: Latest secure release
npm install nodebb@Latest secure release
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-2025-50979, 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 the patched release), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. 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

NodeBB v4.3.0 is vulnerable to SQL injection in its search-categories API endpoint (/api/v3/search/categories). The search query parameter is not properly sanitized, allowing unauthenticated, remote attackers to inject boolean-based blind and PostgreSQL error-based payloads.

CVE-2025-50979 Affected Nodebb Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
nodebb
npm
≤ 4.3.0

References

Frequently Asked Questions

What is CVE-2025-50979?
CVE-2025-50979 is a security vulnerability in Nodebb involving NodeBB SQL Injection vulnerability under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Nodebb versions are affected?
Affected versions include releases prior to current release patches across affected packages: nodebb.
What version fixes CVE-2025-50979?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is nodebb affected?
Yes, nodebb is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-50979?
CVE-2025-50979 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check npm dependencies for CVE-2025-50979?
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-rfh2-8vxq-jqr8",
  "modified" : "2025-08-27T19:28:28Z",
  "published" : "2025-08-27T18:31:55Z",
  "aliases" : [ "CVE-2025-50979" ],
  "summary" : "NodeBB SQL Injection vulnerability",
  "details" : "NodeBB v4.3.0 is vulnerable to SQL injection in its search-categories API endpoint (/api/v3/search/categories). The search query parameter is not properly sanitized, allowing unauthenticated, remote attackers to inject boolean-based blind and PostgreSQL error-based payloads.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nodebb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-50979"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/4rdr/proofs/blob/main/info/NodeBB-v4.3.0.-SQL-Injection-via-search-parameter.md"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/NodeBB/NodeBB"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-27T19:28:28Z",
    "nvd_published_at" : "2025-08-27T18:15:45Z"
  }
}