Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as record-scoped user
-
DeliveryDelete a referenced parent record
-
ExploitTrigger REFERENCE ON DELETE cascade in purge_references
-
ExecutionCascade runs with perms suppressed (with_perms(false))
-
ImpactDelete/unset/CUSTOM-execute on protected referencing records
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires (1) an authenticated principal - consistent with PR:L - who holds DELETE permission on a referenced table (e.g. 'user'), and (2) a non-default schema in which an administrator has configured DEFINE FIELD ... REFERENCE ON DELETE CASCADE, ON DELETE UNSET, or ON DELETE CUSTOM on a referencing table that also carries restrictive PERMISSIONS FOR delete NONE or update NONE. The bypass only manifests against tables that are the target of such an incoming REFERENCE ON DELETE cascade; tables without this configuration are unaffected. Limiting factors that bound real-world risk: the attacker cannot cross namespace or database isolation boundaries, cannot act on referenced tables where they lack DELETE permission, and the vulnerable REFERENCE ON DELETE feature only exists from v2.2.0 onward. The interim mitigation per the advisory is to restrict DELETE permission on referenced tables to principals already trusted to delete/modify all referencing tables; the vendor states that upgrading to 4.0.0 is the complete fix. |
| Impact | The vendor CVSS 4.0 base score is 7.2 (High) with vector AV:N/AC:L/AT:N/PR:L/UI:N and impact VI:H/VA:H - network-reachable, low-complexity, but requiring low-level authentication (PR:L) and yielding high integrity and availability impact with no confidentiality loss. This is an authorization bypass (CWE-863), not remote code execution, so the realistic ceiling is unauthorized deletion/modification of records in permission-restricted tables, not system compromise. No CISA KEV listing is present, so there is no confirmed active exploitation; no EPSS probability was supplied, so widespread-exploitation likelihood cannot be quantified from this data. A detailed, reproducible proof-of-concept is published in the GHSA advisory, which raises practical risk above a theoretical-only finding. The vuln.today Decision label is 'this_week' (an elevated but not emergency priority), consistent with a credible, reliable primitive that is nonetheless gated by preconditions. Net assessment: a genuine, deterministic privilege/permission bypass worth prompt remediation, but its real-world blast radius is bounded by two conditions - the attacker needs DELETE permission on a referenced table, and an administrator must have deployed REFERENCE ON DELETE CASCADE/UNSET/CUSTOM with restrictive PERMISSIONS on the referencing table. It is not an unauthenticated internet-wide mass-exploitation issue despite the network vector. |
| Exploit ScenarioDerived | In a multi-tenant SurrealDB deployment, an administrator defines an 'audit_log' table with PERMISSIONS FOR delete NONE and a REFERENCE ON DELETE CASCADE field pointing to 'user'. A low-privileged record-scoped user who is allowed to delete their own 'user' record issues DELETE user:alice, which triggers the cascade and silently deletes the referencing audit_log rows the user was explicitly forbidden to delete directly. A working proof-of-concept demonstrating exactly this bypass is published in the GHSA advisory; the primitive is deterministic (a single DELETE statement), reachable over HTTP, WebSocket, RPC, or GraphQL, and requires only the low-level authentication reflected in PR:L. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 21, 2026
Authorization bypass in SurrealDB 2.2.0 through 3.3.0 lets an authenticated user who holds DELETE permission on a referenced table (for example user) indirectly delete, modify, or run admin-defined expressions against records in a referencing table that declares PERMISSIONS FOR delete NONE or update NONE. Deleting the referenced record triggers a REFERENCE ON DELETE CASCADE, UNSET, or CUSTOM cascade that executes with permission checks unconditionally suppressed, so the target table's PERMISSIONS clause is never evaluated. Severity is high for integrity and availability (CVSS 4.0 base 7.2; assessed CVSS 3.1 7.2 with PR:L), exploitation requires a non-default schema where an administrator has defined a REFERENCE ON DELETE strategy on a table with restrictive permissions, and the advisory publishes a step-by-step reproduction procedure; it is not verified as working exploit code, and no CISA KEV entry or other active-exploitation signal is present. Upgrade to 4.0.0 is the complete fix.
RemediationAI
Upgrade to SurrealDB 4.0.0, the version the vendor identifies as the complete fix and the first release in which REFERENCE ON DELETE CASCADE/UNSET/CUSTOM (THEN) clauses run under the caller's permissions (upstream commit f980336355, referenced from GHSA-fh2q-8f75-m4h6); the crates.io package entry lists surrealdb < 4.0.0 as vulnerable and 4.0.0 as fixed. Note that after patching, a cascade the caller is not permitted to complete will no longer silently succeed, so review schemas that combine REFERENCE ON DELETE strategies with PERMISSIONS FOR delete NONE or update NONE to decide whether blocked cascades should abort the triggering DELETE or be skipped, matching the behaviour of a direct DELETE against a restricted table. If upgrading cannot happen immediately, the vendor's stated interim mitigation is to restrict DELETE permission on referenced tables to principals that are also trusted to delete or modify records in every referencing table; the trade-off is that legitimate record-scoped users lose the ability to delete their own referenced records, and this is a permissions redesign rather than a substitute for the 4.0.0 upgrade, which the vendor describes as the only complete fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SurrealDB is a Rust-implemented multi-model database exposed over HTTP, WebSocket, RPC and GraphQL, and the flaw sits in its document deletion pipeline. When a record is deleted, Document::delete calls purge_record_data, which calls Document::purge_references in surrealdb/core/src/doc/purge.rs; that function scans incoming reference keys, decodes the foreign table, field and record, and dispatches to the configured ON DELETE strategy. At all three dispatch sites (the CASCADE path around line 376, the UNSET path around line 385, and the CUSTOM path around line 453) it clones the caller's Options and calls with_perms(false), setting opt.perms to false. Later, check_perms in surrealdb/core/src/ctx/context.rs returns Ok(false) immediately when !opt.perms, so check_delete_permissions skips evaluation of the target table's PERMISSIONS clause entirely. This is CWE-863 (incorrect authorization): a confused-deputy pattern in which system-internal cascade logic inherits more authority than the triggering principal. The project's own SECURITY_GUIDE.md states that permission suppression for internal paths such as events, views and cascades must not extend to user-supplied expressions or user-controlled lookups, and lines 847-857 classify reference cascades as a confused-deputy risk. The sibling function purge_edges was already corrected in 3.1.0 (CVE-2026-49997, GHSA-whwg-vh4f-pmmf) to preserve the caller's opt so edge tables keep enforcing PERMISSIONS FOR delete; purge_references retained the pre-fix pattern. The proposed correction replaces each opt.clone().with_perms(false) with the caller's opt, and the vendor's fix runs the REFERENCE ON DELETE CASCADE/UNSET/CUSTOM (THEN) clause under the caller's permissions (commit f980336355).
Know when Surrealdb gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Network-reachable DELETE over any API with low-privileged auth (PR:L) and no user interaction; cascade deletes/modifies protected records (I:H, A:H) with no data disclosure (C:N) and no cross-authority scope change (S:U).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
SurrealDB from 2.2.0 before 4.0.0 contains an authorization bypass vulnerability in Document::purge_references that lets authenticated users bypass target table PERMISSIONS by triggering REFERENCE ON DELETE cascades. Attackers can delete a referenced record to delete, unset, or run CUSTOM expressions on referencing records despite PERMISSIONS FOR delete or update NONE.
Technical POC Analysis
CWE-863 (Incorrect Authorization), a confused-deputy pattern in SurrealDB's reference-cascade cleanup.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity authorization bypass in SurrealDB versions 2.2.0 through 3.3.0 allows authenticated users with DELETE permission on a referenced table to inadvertently delete or modify records in more restrictive tables, bypassing permission checks. This impacts data integrity and availability for organizations using multi-table schemas with cascading deletes, potentially leading to unauthorized data loss or corruption. Leadership should prioritize remediation due to the risk of insider misuse or compromised accounts exploiting this flaw.
No vendor-released patch identified at time of analysis. Interim mitigations include restricting DELETE permissions on referenced tables to only fully trusted roles, auditing schemas for REFERENCE ON DELETE strategies that cascade to tables with restrictive permissions, and monitoring database logs for unexpected cascading deletions or modifications.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica
SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow
Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi
Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the
Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read
Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0
Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an
Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo
EUVD-2026-132241
GHSA-3xxc-3r8v-992v
NVD
CVE.org
EPSS
Exploit-DB