Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Surrealdb core: SurrealDB: Writes in a PERMISSIONS clause bypass table permissions (CVE-2026-63733)

0
Medium
Published: 09/04/2026 (09/04/2026, 20:50:40 UTC)
Source: GCVE Database
Product: surrealdb-core

Description

A `PERMISSIONS ... WHERE` clause is evaluated with permission enforcement disabled, so it can't recurse into its own checks. But the clause could also contain data-modifying statements, and these ran with enforcement still off — so evaluating a permission check could write to tables the caller cannot write. For example: ```surql DEFINE TABLE post PERMISSIONS FOR update WHERE (CREATE log SET at = time::now()) OR true; ``` Any user allowed to update a `post` now also creates a `log` record, even with no permission on `log`. The clause is evaluated once per matched record, so one statement can cause several writes. ### Impact Only databases with a `PERMISSIONS` clause that contains a write are affected; `FULL`, `NONE`, and read-only clauses are not. What an attacker **can** do: - With permission to perform the guarded operation (a low-privileged or record user is enough), write to tables in their own database that their permissions would otherwise forbid, by triggering an operation the clause guards. - Cause several writes from a single statement — the clause is evaluated once per matched record. - Trigger unintended events, cascades, or data corruption on those tables. What it **can't** do: - Escape the caller's own namespace and database — a permission clause cannot switch namespace or database. - Perform root- or namespace-level actions such as creating users; the caller's role still applies. - Read hidden data — this is an integrity issue, not disclosure. ### Patches Permission clauses must now be read-only: defining or importing one that contains a write is rejected, and any write attempted while a clause is evaluated is blocked at runtime, including writes reached through a called function. Read-only clauses are unaffected. - Versions 3.2.0 and later are not affected by this issue. ### Workarounds Users unable to patch should consider the following workarounds: - Review your `PERMISSIONS` clauses and remove any containing `CREATE`, `UPDATE`, `DELETE`, `RELATE`, `INSERT`, or `UPSERT`. - Limit who can define schema and vet imported data — such a clause must be defined before it can be triggered. ### Resources - [DEFINE TABLE … PERMISSIONS](https://surrealdb.com/docs/surrealql/statements/define/table) - [DEFINE FIELD](https://surrealdb.com/docs/surrealql/statements/define/field) - `fix(core): reject writes in PERMISSIONS clauses and block writes during permission evaluation` (included in SurrealDB 3.2.0) ### Acknowledgements Thank you to [sondt99](https://github.com/sondt99) for reporting this issue.

CVSS v3.1

Score 4.3medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Affected software

crates.ioghsa
surrealdb-core
Affected versions
<3.2.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-66r2-5gwj-gxm2
Osv Schema Version
1.4.0
Aliases
["CVE-2026-63733"]
Ecosystems
["crates.io"]
Database Specific Severity
MODERATE
Cvss Version
3.1

Threat ID: 6a9c2642acd9273b49fc9bde

Added to database: 09/05/2026, 14:25:06 UTC

Last updated: 09/05/2026, 14:25:06 UTC

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses