Vulnerability · Published May 7, 2026 · Assigned by GitHub_M
CVE-2026-41640NocoBase Vulnerable to SQL Injection via String Concatenation in Recursive Eager Loading
High 7.5
In plain English
A high-severity SQL injection in nocobase from nocobase. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.9% (higher than 79% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei. Fixed versions are available - upgrade the affected package.
Official description
NocoBase is an AI-powered no-code/low-code platform for building business applications and enterprise solutions. Prior to version 2.0.39, 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. This issue has been patched in version 2.0.39.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @nocobase/database | 2.0.39 | GHSA-4948-f92q-f432 |
Affected products (as reported)
Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/nocobase/nocobase/security/advisories/GHSA-4948-f92q-f432 x_refsource_CONFIRM
- https://github.com/nocobase/nocobase/pull/9133 x_refsource_MISC
- https://github.com/nocobase/nocobase/commit/202e2b8efe44ba90adbf1087f6f70881ff947604 x_refsource_MISC
- https://github.com/nocobase/nocobase/releases/tag/v2.0.39 x_refsource_MISC