CVE-2026-63733: SurrealDB before 3.2.0 Permissions Bypass via PERMISSIONS Clause

Published Jul 20, 2026
·
Updated

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 - 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 for reporting this issue.

Other sources

SurrealDB versions before 3.2.0 contain a permissions bypass vulnerability where data-modifying statements within PERMISSIONS clauses execute with enforcement disabled. Attackers with permission to perform a guarded operation can write to tables they lack permission for by embedding CREATE, UPDATE, DELETE, or UPSERT statements in the PERMISSIONS clause, causing unintended writes and data corruption.

— NVD

Affected Software

3 affected componentsFixes available
SurrealDB SurrealDB<3.2.0
SurrealDB SurrealDB<3.2.0
rust/surrealdb-core<3.2.0
3.2.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/surrealdb-core to a version that resolves this vulnerability.

    Fixed in 3.2.0
  2. Upgrade

    Upgrade SurrealDB to a version that resolves this vulnerability.

    Fixed in 3.2.0Patch fix(core): reject writes in PERMISSIONS clauses and block writes during permission evaluation
  3. Configuration

    Review each DEFINE TABLE … PERMISSIONS clause and remove any containing data-modifying statements: CREATE, UPDATE, DELETE, RELATE, INSERT, or UPSERT. Ensure permission clauses are read-only.

    SurrealDB PERMISSIONS clauses PERMISSIONS clause content = read-only (remove any containing CREATE, UPDATE, DELETE, RELATE, INSERT, or UPSERT)
  4. Configuration

    For environments unable to patch before 3.2.0, avoid patterns where the WHERE portion can perform writes during permission evaluation. The material notes that WHERE clauses are evaluated with permission enforcement disabled and provides an example containing CREATE; do not use such data-modifying statements in PERMISSIONS/WHERE logic.

    SurrealDB workaround for vulnerable versions before 3.2.0 WHERE clause in PERMISSIONS = WHERE (CREATE log SET at = time::now()) OR true

Event History

Jul 20, 2026
CVE Published
via MITRE·12:04 PM
Data Sourced
via MITRE·12:04 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:19 PM
DescriptionSeverityWeaknessAffected Software
Sep 4, 2026
Advisory Published
via GitHub·08:50 PM
Data Sourced
via GitHub·08:50 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-63733?

CVE-2026-63733 has a severity rating of medium, with a score of 5.3.

2

How do I fix CVE-2026-63733?

To fix CVE-2026-63733, upgrade SurrealDB to version 3.2.0 or later.

3

What type of vulnerability is CVE-2026-63733?

CVE-2026-63733 is a permissions bypass vulnerability.

4

What impact does CVE-2026-63733 have on data security?

CVE-2026-63733 allows attackers with certain permissions to write to tables they shouldn't have access to.

5

Which software is affected by CVE-2026-63733?

CVE-2026-63733 affects all versions of SurrealDB prior to 3.2.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203