Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-109340 Overview
CVE-2026-109340 is an authorization bypass vulnerability in SurrealDB versions 3.1.0 through versions before 3.3.0. Authenticated users can delete protected graph edges by triggering a REFERENCE ON DELETE CASCADE operation. The cascade path disables permission checks during edge cleanup, bypassing the edge table's PERMISSIONS FOR delete clause. Any attacker holding delete rights on a referenced table can erase edges they would otherwise be denied access to. The weakness is tracked under CWE-862: Missing Authorization.
Critical Impact
Authenticated users with limited delete permissions can erase protected graph edges, undermining data integrity controls enforced through SurrealDB's declarative permission model.
Affected Products
- SurrealDB 3.1.0
- SurrealDB versions after 3.1.0 and before 3.3.0
- Fixed in SurrealDB 3.3.0
Discovery Timeline
- 2026-10-12 - CVE-2026-109340 published to the National Vulnerability Database
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-109340
Vulnerability Analysis
SurrealDB supports graph edges that connect records across tables. Developers can declare REFERENCE ON DELETE CASCADE to automatically remove dependent edges when a referenced record is deleted. SurrealDB also supports fine-grained PERMISSIONS FOR delete clauses on edge tables to restrict which authenticated principals may remove specific edges.
The cascade execution path does not evaluate the edge table's delete permission clause. When a user with delete rights on a referenced table removes a record, the cascade cleanup erases connected edges regardless of whether the caller is authorized to delete those edges directly. This breaks the authorization model that developers rely on to protect relationship data.
Root Cause
The root cause is a missing authorization check during cascade-driven deletions. The engine treats cascade cleanup as a privileged internal operation rather than evaluating it under the invoking user's permission context. This matches the pattern described by CWE-862, where a security-sensitive function fails to verify the actor's authorization.
Attack Vector
Exploitation requires an authenticated session with delete permission on a table referenced by a graph edge. The attacker deletes a referenced record whose declaration includes REFERENCE ON DELETE CASCADE. The cascade removes edges in the protected edge table without consulting its PERMISSIONS FOR delete clause, achieving the unauthorized deletion indirectly.
No verified public exploit code is available at this time. Technical details are documented in the GitHub Security Advisory GHSA-4w65-7h3j-p29h and the VulnCheck Advisory on the SurrealDB authorization bypass.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-109340
Indicators of Compromise
- Unexpected deletions of records in edge tables that have restrictive PERMISSIONS FOR delete clauses defined.
- Delete operations on referenced tables followed immediately by missing edge records that the invoking user lacked direct permission to remove.
- Audit log entries showing cascade-triggered deletions originating from accounts without edge delete rights.
Detection Strategies
- Review SurrealDB query logs for DELETE statements against tables that participate in REFERENCE ON DELETE CASCADE relationships.
- Compare pre- and post-operation edge counts for sensitive edge tables and flag reductions not attributable to privileged accounts.
- Enumerate schema definitions to inventory all tables declaring REFERENCE ON DELETE CASCADE and correlate activity against those tables with least-privileged user sessions.
Monitoring Recommendations
- Centralize SurrealDB operational logs into a SIEM and alert on bulk edge disappearance in tables governed by delete permission clauses.
- Monitor for permission-sensitive deletes initiated by accounts whose roles do not include direct delete access to the affected edge table.
- Baseline normal cascade activity so anomalies tied to CVE-2026-109340 exploitation stand out.
How to Mitigate CVE-2026-109340
Immediate Actions Required
- Upgrade SurrealDB to version 3.3.0 or later across all production and staging deployments.
- Audit existing schemas for REFERENCE ON DELETE CASCADE declarations and identify edge tables protected only by PERMISSIONS FOR delete.
- Revoke unnecessary delete permissions on referenced tables held by low-trust authenticated accounts.
Patch Information
The vulnerability is fixed in SurrealDB 3.3.0. See the GitHub Security Advisory GHSA-4w65-7h3j-p29h for upstream remediation details and release notes.
Workarounds
- Remove or redesign REFERENCE ON DELETE CASCADE declarations that depend on edge-table delete permissions for enforcement.
- Restrict delete permissions on referenced tables so only trusted roles can trigger cascade behavior.
- Enforce authorization in application logic as a defense-in-depth measure until the upgrade to 3.3.0 is complete.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

