CVE-2026-63755: SurrealDB: Scraping a TABLE with no available PERMISSIONS to current auth level
A vulnerability was discovered where the user-supplied WHERE clause in a SELECT statement is evaluated against the full record data before PERMISSIONS FOR SELECT WHERE determines whether the principal is authorised to access that record. A side-effecting expression in the WHERE clause can exfiltrate record contents before the permission check runs.
Published Jul 1, 2026 · Updated Sep 4, 2026
Affected packages
surrealdb
- Ecosystem
- Rust (crates.io)
- Affected
- < 3.1.0
- Fixed in
- 3.1.0
- Check
cargo tree -i surrealdb
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
A vulnerability was discovered where the user-supplied WHERE clause in a SELECT statement is evaluated against the full record data before PERMISSIONS FOR SELECT WHERE determines whether the principal is authorised to access that record. A side-effecting expression in the WHERE clause can exfiltrate record contents before the permission check runs. The same ordering bug affects the SET, MERGE, CONTENT and PATCH clauses of update-variant statements (UPDATE, UPSERT-update, INSERT ON DUPLICATE KEY UPDATE, RELATE-update).
This vulnerability is confined to the attacker's current database. It does not cross namespace or database isolation boundaries.
Impact
An authenticated user — including Record and Scope users — can read the full contents of any table in the database they are authenticated against, bypassing PERMISSIONS FOR SELECT WHERE restrictions on those tables.
The most direct exfiltration method requires scripting functions to be enabled (--allow-scripting / -A). However, exfiltration via SurrealQL's THROW statement is also feasible without scripting functions, and timing-based side-channel extraction is possible in all configurations.
All tables within the attacker's current database, regardless of table-level PERMISSIONS FOR SELECT WHERE restrictions on those tables, are vulnerable to this attack. Tables in other databases within the same namespace, or within other namespaces, are not vulnerable.
Patches
A patch has been introduced that runs check_permissions_table before any user-supplied expression is evaluated against the record. A new check_pre_update helper centralises this ordering on every update-variant code path. Regression tests covering WHERE, SET, MERGE, CONTENT, INSERT ON DUPLICATE KEY UPDATE, and RELATE with THROW side-effects are included.
- Versions 3.1.0 and later are not affected by this issue.
Workarounds
Affected users who are unable to update may want to:
- Disable scripting functions if not required — remove the
-A/--allow-scriptingflag. This blocks the most direct exfiltration method but does not fully mitigate the vulnerability, asTHROW-based and timing-based exfiltration remain possible. - Limit query access — restrict the ability of untrusted principals to run arbitrary
SELECTqueries with user-controlledWHEREclauses. - Use namespace/database isolation instead of table-level permissions as the primary security boundary where feasible, since the vulnerability is in table-level permission enforcement, not namespace or database isolation.
Credited to LucyEgan.
References
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-98fx-66cf-fc7c
- https://github.com/surrealdb/surrealdb/commit/500f4060349580b9cbb9c07b8112a487551c4616
- https://nvd.nist.gov/vuln/detail/CVE-2026-63755
- https://www.vulncheck.com/advisories/surrealdb-before-permission-bypass-via-where-clause
- https://github.com/advisories/GHSA-98fx-66cf-fc7c
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesCVE-2026-63735
SurrealDB: Custom API route lets authenticated callers override namespace/database scope via URL path
high8.1Sep 4, 2026CVE-2026-63740
SurrealDB: Array element-level (field.*) SELECT permissions leak denied elements to record users
medium6.5Aug 14, 2026CVE-2026-49997
SurrealDB: Edge PERMISSIONS FOR delete bypassed when a connected node is deleted
medium5.4Jul 1, 2026CVE-2026-63743
SurrealDB: Port-specific --deny-net rules silently bypassed on HTTP redirect
medium6.4Jul 1, 2026CVE-2026-63746
SurrealDB: Graph traversal bypasses table SELECT permissions
medium6.5Jul 1, 2026CVE-2026-63748
SurrealDB: Authenticated callers can read fields hidden by field-level SELECT permissions via error messages
medium4.3Jul 1, 2026
