CVE-2026-63733: SurrealDB Writes Vulnerability

MODERATE
Advisory Identifier: GHSA-66r2-5gwj-gxm2
CVSS 4.3
CWE-863
Published
Advisory Summary

CVE-2026-63733 is a MODERATE (CVSS 4.3) writes vulnerability (CWE-863: Incorrect Authorization) affecting SurrealDB libraries in the crates.io ecosystem. The issue involves writes in a permissions clause bypass table permissions. Remediation is available by upgrading affected packages to version 3.2.0.

CVE-2026-63733 at a Glance

CVE Identifier CVE-2026-63733
GHSA Identifier GHSA-66r2-5gwj-gxm2
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-863: Incorrect Authorization
Affected Product SurrealDB
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N).

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

How to Fix CVE-2026-63733

To remediate this vulnerability, upgrade all affected SurrealDB dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

surrealdb-core fixed: 3.2.0
Upgrade surrealdb-core to 3.2.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for surrealdb-core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-63733, inspect your project dependencies for SurrealDB:

inspect dependencies for surrealdb-core

Analyze the terminal output to locate any version of SurrealDB in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In SurrealDB, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-63733 Affected SurrealDB Versions

1 component(s)
Fixed Versions:
3.2.0
Product / Package Ecosystem Affected Versions Fixed Version
surrealdb-core
crates.io
< 3.2.0
3.2.0

References

Frequently Asked Questions

What is CVE-2026-63733?
CVE-2026-63733 is a security vulnerability in SurrealDB involving Writes in a PERMISSIONS clause bypass table permissions under CWE-863: Incorrect Authorization.
Which SurrealDB versions are affected?
Affected versions include releases prior to 3.2.0 across affected packages: surrealdb-core.
What version fixes CVE-2026-63733?
Upgrading to 3.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is surrealdb-core affected?
Yes, surrealdb-core is affected in releases prior to 3.2.0. Upgrade your dependency to 3.2.0 or later.
What is the CVSS score of CVE-2026-63733?
CVE-2026-63733 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-63733?
CVE-2026-63733 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check crates.io dependencies for CVE-2026-63733?
Run the dependency tree command: 'inspect dependencies for surrealdb-core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-66r2-5gwj-gxm2",
  "modified" : "2026-09-04T20:50:40Z",
  "published" : "2026-09-04T20:50:40Z",
  "aliases" : [ "CVE-2026-63733" ],
  "summary" : "SurrealDB: Writes in a PERMISSIONS clause bypass table permissions",
  "details" : "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.\n\nFor example:\n\n```surql\nDEFINE TABLE post PERMISSIONS FOR update\n    WHERE (CREATE log SET at = time::now()) OR true;\n```\n\nAny 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.\n\n### Impact\n\nOnly databases with a `PERMISSIONS` clause that contains a write are affected; `FULL`, `NONE`, and read-only clauses are not.\n\nWhat an attacker **can** do:\n\n- 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.\n- Cause several writes from a single statement — the clause is evaluated once per matched record.\n- Trigger unintended events, cascades, or data corruption on those tables.\n\nWhat it **can't** do:\n\n- Escape the caller's own namespace and database — a permission clause cannot switch namespace or database.\n- Perform root- or namespace-level actions such as creating users; the caller's role still applies.\n- Read hidden data — this is an integrity issue, not disclosure.\n\n### Patches\n\nPermission 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.\n\n- Versions 3.2.0 and later are not affected by this issue.\n\n### Workarounds\n\nUsers unable to patch should consider the following workarounds:\n\n- Review your `PERMISSIONS` clauses and remove any containing `CREATE`, `UPDATE`, `DELETE`, `RELATE`, `INSERT`, or `UPSERT`.\n- Limit who can define schema and vet imported data — such a clause must be defined before it can be triggered.\n\n### Resources\n\n- [DEFINE TABLE … PERMISSIONS](https://surrealdb.com/docs/surrealql/statements/define/table)\n- [DEFINE FIELD](https://surrealdb.com/docs/surrealql/statements/define/field)\n- `fix(core): reject writes in PERMISSIONS clauses and block writes during permission evaluation` (included in SurrealDB 3.2.0)\n\n### Acknowledgements\n\nThank you to [sondt99](https://github.com/sondt99) for reporting this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "surrealdb-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-66r2-5gwj-gxm2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-63733"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/commit/1e4c3d743e1591f14f340cb627e56d98b6bd7fd7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/commit/afea699dfb3c8f274ab36861f8a95f5e98d82f1b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/surrealdb/surrealdb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/surrealdb/surrealdb/releases/tag/v3.2.0"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/surrealdb-before-permissions-bypass-via-permissions-clause"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-04T20:50:40Z",
    "nvd_published_at" : null
  }
}