Executive brief
NocoBase, a platform for building internal business tools, contains a vulnerability that allows administrative users to bypass security restrictions and access sensitive database information. While these users are intended to manage the application's interface and workflows, this flaw allows them to step outside their authorized boundaries to view internal database password hashes and system configurations. This could lead to a complete compromise of the underlying database, allowing an attacker to read or modify all stored data beyond what the NocoBase application itself controls.
Technical details
The `checkSQL()` function in `plugin-collection-sql` utilizes a blacklist-based approach to filter dangerous SQL commands. This blacklist is insufficient as it fails to restrict access to PostgreSQL system catalog tables (e.g., `pg_shadow`, `pg_roles`, `pg_stat_activity`) and application-level sensitive tables like `users`. An authenticated attacker with the `admin` role can execute arbitrary `SELECT` queries via the `/api/sqlCollection:execute` endpoint to dump database password hashes and enumerate the full schema. This represents a security boundary violation (Scope Change) from application-level administration to database-level access. Patches are available in versions 2.0.62, 2.1.0-alpha.46, and 2.1.0-beta.45.
Affected products
- NocoBase @nocobase/plugin-collection-sql < 2.0.62, >= 2.1.0-alpha.1, < 2.1.0-alpha.46, >= 2.1.0-beta.1, < 2.1.0-beta.45
Timeline
- 2026-05-29: disclosed: Vulnerability discovered and reported to maintainers.
- 2026-06-08: advisory: GitHub Advisory published.
- 2026-07-28: patched: Advisory updated with patched version information.