Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Network-accessible with low-privilege auth required; limited C/I from unauthorized edge observation and deletion; no availability impact or scope change.
Primary rating from Vendor (https://github.com/surrealdb/surrealdb).
CVSS VectorVendor: https://github.com/surrealdb/surrealdb
Lifecycle Timeline
1DescriptionCVE.org
In SurrealDB, records can be connected as a graph: a RELATE statement creates an edge record between two node records. If either endpoint node is deleted, SurrealDB automatically removes the edge row to keep the graph consistent.
A user with permission to delete a node could also delete the edges connected to that node, even when the edge table's PERMISSIONS FOR delete clause should have stopped them.
The automatic edge removal (Document::purge_edges) ran with permissions disabled (opt.clone().with_perms(false)), so the edge table's PERMISSIONS FOR delete and PERMISSIONS FOR select clauses were never consulted. The removal step could also observe edge state that the edge's SELECT clause should have hidden.
Impact
What an attacker can do:
- Delete any edge connected to a node they can delete, regardless of the edge table's
PERMISSIONS FOR deleteclause. - Observe edge contents that
PERMISSIONS FOR selectshould have hidden, as a side effect of the same edge-removal step.
What it can't do:
- Delete nodes on tables they do not hold
DELETEon (the edge removal only runs from an authorised node delete). - Cross namespace or database isolation boundaries.
- Escalate to root or operator-level privileges.
Patches
Document::purge_edges now propagates the caller's permission context into the edge removal. Each connected edge DELETE is evaluated against the edge table's PERMISSIONS FOR delete clause, matching a direct DELETE.
Versions 3.1.0 and later are not affected.
Workarounds
- Restrict node
DELETEpermission to principals trusted to delete all connected edge records. - Use namespace or database isolation as the primary boundary where edge-level
PERMISSIONSis load-bearing for multi-tenant separation.
AnalysisAI
SurrealDB's automatic graph edge cleanup mechanism bypasses edge-table permission clauses, allowing authenticated low-privilege users to delete edge records and observe hidden edge contents they are not authorized to access. When a node is deleted, the Document::purge_edges routine fires with permissions explicitly disabled (opt.clone().with_perms(false)), meaning the edge table's PERMISSIONS FOR delete and PERMISSIONS FOR select clauses are never consulted. This is a confirmed authorization bypass (CWE-285) fixed in version 3.1.0; no public exploit has been identified at time of analysis, and the vulnerability is not listed in CISA KEV.
Technical ContextAI
SurrealDB is a multi-model database written in Rust (pkg:rust/surrealdb) that supports graph relationships via RELATE statements, which create typed edge records linking two node records. To maintain graph consistency, SurrealDB automatically removes edge records when either endpoint node is deleted - this is handled by Document::purge_edges. The root cause (CWE-285: Improper Authorization) is that this cleanup routine propagated a permission-disabled execution context (opt.clone().with_perms(false)) rather than the calling user's permission context, effectively granting the edge-removal step unrestricted access to the edge table regardless of what PERMISSIONS FOR delete or PERMISSIONS FOR select clauses specified. SurrealDB's PERMISSIONS clauses are the primary access control mechanism for table-level authorization in multi-tenant or role-separated deployments, making this bypass particularly impactful in those architectures.
RemediationAI
Upgrade SurrealDB to version 3.1.0 or later, which patches Document::purge_edges to propagate the caller's permission context so that each connected edge DELETE is evaluated against the edge table's PERMISSIONS FOR delete clause. The upstream fix is available at https://github.com/surrealdb/surrealdb/pull/242 and commit a80d1784cf75358441978bbd77688855e95f4578; note that while these references point to a PR and commit rather than a tagged release, the advisory text explicitly states 3.1.0 as the resolved version. If immediate upgrade is not possible, restrict node-table DELETE permission exclusively to principals who are already trusted to delete all connected edge records - this eliminates the authorization gap, though it may be overly restrictive in role-separated deployments. Additionally, per vendor guidance, rely on namespace or database isolation rather than edge-level PERMISSIONS clauses as the primary security boundary for multi-tenant separation until the patch is applied; collapsing tenants to separate namespaces removes reliance on the bypassed permission layer.
Same weakness CWE-285 – Improper Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-44713
GHSA-whwg-vh4f-pmmf