{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:nocobase:nocobase:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.0.39"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "b03cab07e7bc11cf5c79f6b12f28bfcd3ae22aea"
            },
            {
              "fixed": "202e2b8efe44ba90adbf1087f6f70881ff947604"
            }
          ],
          "repo": "https://github.com/nocobase/nocobase",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-4948-f92q-f432"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-89"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41640.json"
  },
  "details": "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.",
  "id": "CVE-2026-41640",
  "modified": "2026-08-12T03:51:36.683342751Z",
  "published": "2026-05-07T04:09:59.264Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nocobase/nocobase/releases/tag/v2.0.39"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41640.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/nocobase/nocobase/security/advisories/GHSA-4948-f92q-f432"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41640"
    },
    {
      "type": "FIX",
      "url": "https://github.com/nocobase/nocobase/commit/202e2b8efe44ba90adbf1087f6f70881ff947604"
    },
    {
      "type": "FIX",
      "url": "https://github.com/nocobase/nocobase/pull/9133"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "NocoBase Vulnerable to SQL Injection via String Concatenation in Recursive Eager Loading"
}