Skip to content

← Actionable
High, CVSS 7.2amended

@nocobase/plugin-collection-sql: SQL Validation Bypass Through Missing checkSQL Call

CVE-2026-41641GHSA-wrwh-c28m-9jjh

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (@nocobase/plugin-collection-sql 2.0.39), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.2 · CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
EPSS
  • CVE-2026-41641: 1.83% estimated exploitation activity in the next 30 days; percentile 78.93 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary The checkSQL() validation function that blocks dangerous SQL keywords (e.g., pgreadfile, LOADFILE, dblink) is applied on the collections:create and sqlCollection:execute endpoints but is entirely missing on the sqlCollection:update endpoint. An attacker with collection management permissions can create a SQL collection with benign SQL, then update it with arbitrary SQL that bypasses all validation, and query the collection to execute the injected SQL and exfiltrate data. Affected component: @nocobase/plugin-collection-sql Affected versions: <= 2.0.32 (confirmed) Minimum privilege: Collection management permissions (pm.data-source-manager.collection-sql snippet) Vulnerable Code checkSQL is applied on create and execute packages/plugins/@nocobase/plugin-collection-sql/src/server/resources/sql.ts checkSQL is NOT applied on update The checkSQL function itself packages/plugins/@nocobase/plugin-collection-sql/src/server/utils.ts:10-28 PoC Impact - Confidentiality: Arbitrary SELECT…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-wrwh-c28m-9jjh

  2. Revision 1 · created ·

    Published from osv record GHSA-wrwh-c28m-9jjh

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-41641

Advisory: @nocobase/plugin-collection-sql: SQL Validation Bypass Through Missing `checkSQL` Call
IDs: CVE-2026-41641, GHSA-wrwh-c28m-9jjh
Record: https://patchnext.com/advisories/cve-2026-41641 (revision 2, source checked 26 Oct 2026, 12:51 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.2)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: @nocobase/plugin-collection-sql 2.0.39. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @nocobase/plugin-collection-sql: affected < 2.0.39; fixed in 2.0.39

## Suggested inspection (read-only)
- `npm ls @nocobase/plugin-collection-sql --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @nocobase/plugin-collection-sql.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-wrwh-c28m-9jjh (OSV record GHSA-wrwh-c28m-9jjh lists affected ranges: npm @nocobase/plugin-collection-sql >=0 <2.0.39 (fixed))
- Verified: https://github.com/advisories/GHSA-wrwh-c28m-9jjh (GitHub-reviewed advisory GHSA-wrwh-c28m-9jjh lists affected ranges: npm @nocobase/plugin-collection-sql >=0 <2.0.39)

Commands are suggestions: review each one before running it.

Loading voting…