Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @nocobase/database
  4. ›
  5. CVE-2026-41640

CVE-2026-41640: @nocobase/database has SQL Injection via String Concatenation through Recursive Eager Loading

April 22, 2026 (updated May 8, 2026)

The queryParentSQL() function in the core database package constructs a recursive CTE query by joining nodeIds with string concatenation instead of using parameterized queries. The nodeIds array contains primary key values read from database rows. An attacker who can create a record with a malicious string primary key can inject arbitrary SQL when any subsequent request triggers recursive eager loading on that collection.

Affected component: @nocobase/database (core) Affected versions: <= 2.0.32 (confirmed) Minimum privilege: Any user with record-creation permission on a tree collection with string-type primary keys

References

  • github.com/advisories/GHSA-4948-f92q-f432
  • github.com/nocobase/nocobase/commit/202e2b8efe44ba90adbf1087f6f70881ff947604
  • github.com/nocobase/nocobase/pull/9133
  • github.com/nocobase/nocobase/releases/tag/v2.0.39
  • github.com/nocobase/nocobase/security/advisories/GHSA-4948-f92q-f432
  • nvd.nist.gov/vuln/detail/CVE-2026-41640

Code Behaviors & Features

Detect and mitigate CVE-2026-41640 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.0.39

Fixed versions

  • 2.0.39

Solution

Upgrade to version 2.0.39 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

npm/@nocobase/database/CVE-2026-41640.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:12 +0000.