{"items":[{"id":"NVI-00015310","kind":"vulnerability","title":"NocoBase: Sensitive Data Exposure via SQL Blacklist Bypass","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-v8vm-cqh8-q87q","CVE-2026-52888"],"plain_summary":"GitHub lists this reviewed advisory for @nocobase/plugin-collection-sql, @nocobase/plugin-collection-sql, @nocobase/plugin-collection-sql. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-5a1dd75f08210060ac24a234e22e7071"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-07-28T20:53:12.000Z","value":"6.8 medium","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-5a1dd75f08210060ac24a234e22e7071"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-5a1dd75f08210060ac24a234e22e7071","url":"https://github.com/advisories/GHSA-v8vm-cqh8-q87q","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-v8vm-cqh8-q87q","publisher":"GitHub Advisory Database","observed_at":"2026-11-03T09:59:04.660Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-5a1dd75f08210060ac24a234e22e7071"],"technology":"@nocobase/plugin-collection-sql","known_exclusions":[],"conditions_summary":"# Security Vulnerability Report: Sensitive Data Exposure via SQL Blacklist Bypass\n\n## Summary\n\nThe `checkSQL()` function in `plugin-collection-sql` implements a **keyword-based blacklist** to prevent dangerous SQL queries from being executed through the SQL Collection feature. However, the blacklist is **incomplete**: it only checks for a subset of dangerous PostgreSQL system functions and **does not restrict access to sensitive system catalog tables** such as `pg_shadow`, `pg_roles`, or `pg_stat_activity`.\n\nAn authenticated user with the `admin` role can exploit this to **dump PostgreSQL password hashes** (`pg_shadow`), **read all NocoBase user credentials** (hashed passwords from the `users` table), and **enumerate the full database schema** — all data that admin users should never be able to access through the application interface.\n\n---\n\n## Affected Component\n\n**File**: `packages/plugins/@nocobase/plugin-collection-sql/src/server/utils.ts`\n\n```typescript\nexport const checkSQL = (sql: string) => {\n  const dangerKeywords = [\n    // PostgreSQL — BLOCKED\n    'pg_read_file',\n    'pg_read_binary_file',\n    'pg_stat_file',\n    'pg_ls_dir',\n    'pg_logdir_ls',\n    'pg_terminate_backend","public_affected_ranges":["< 2.0.62"]},{"certainty":"source_listed","source_ids":["sr-5a1dd75f08210060ac24a234e22e7071"],"technology":"@nocobase/plugin-collection-sql","known_exclusions":[],"conditions_summary":"# Security Vulnerability Report: Sensitive Data Exposure via SQL Blacklist Bypass\n\n## Summary\n\nThe `checkSQL()` function in `plugin-collection-sql` implements a **keyword-based blacklist** to prevent dangerous SQL queries from being executed through the SQL Collection feature. However, the blacklist is **incomplete**: it only checks for a subset of dangerous PostgreSQL system functions and **does not restrict access to sensitive system catalog tables** such as `pg_shadow`, `pg_roles`, or `pg_stat_activity`.\n\nAn authenticated user with the `admin` role can exploit this to **dump PostgreSQL password hashes** (`pg_shadow`), **read all NocoBase user credentials** (hashed passwords from the `users` table), and **enumerate the full database schema** — all data that admin users should never be able to access through the application interface.\n\n---\n\n## Affected Component\n\n**File**: `packages/plugins/@nocobase/plugin-collection-sql/src/server/utils.ts`\n\n```typescript\nexport const checkSQL = (sql: string) => {\n  const dangerKeywords = [\n    // PostgreSQL — BLOCKED\n    'pg_read_file',\n    'pg_read_binary_file',\n    'pg_stat_file',\n    'pg_ls_dir',\n    'pg_logdir_ls',\n    'pg_terminate_backend","public_affected_ranges":[">= 2.1.0-alpha.1, < 2.1.0-alpha.46"]},{"certainty":"source_listed","source_ids":["sr-5a1dd75f08210060ac24a234e22e7071"],"technology":"@nocobase/plugin-collection-sql","known_exclusions":[],"conditions_summary":"# Security Vulnerability Report: Sensitive Data Exposure via SQL Blacklist Bypass\n\n## Summary\n\nThe `checkSQL()` function in `plugin-collection-sql` implements a **keyword-based blacklist** to prevent dangerous SQL queries from being executed through the SQL Collection feature. However, the blacklist is **incomplete**: it only checks for a subset of dangerous PostgreSQL system functions and **does not restrict access to sensitive system catalog tables** such as `pg_shadow`, `pg_roles`, or `pg_stat_activity`.\n\nAn authenticated user with the `admin` role can exploit this to **dump PostgreSQL password hashes** (`pg_shadow`), **read all NocoBase user credentials** (hashed passwords from the `users` table), and **enumerate the full database schema** — all data that admin users should never be able to access through the application interface.\n\n---\n\n## Affected Component\n\n**File**: `packages/plugins/@nocobase/plugin-collection-sql/src/server/utils.ts`\n\n```typescript\nexport const checkSQL = (sql: string) => {\n  const dangerKeywords = [\n    // PostgreSQL — BLOCKED\n    'pg_read_file',\n    'pg_read_binary_file',\n    'pg_stat_file',\n    'pg_ls_dir',\n    'pg_logdir_ls',\n    'pg_terminate_backend","public_affected_ranges":[">= 2.1.0-beta.1, < 2.1.0-beta.45"]}],"null_published_at":"2026-11-03T10:03:26.569Z","source_updated_at":"2026-07-28T20:53:12.000Z","source_disclosed_at":"2026-07-28T20:53:08.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-03T09:59:04.660Z"}],"next_cursor":null,"snapshot_revision":"42594"}