Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with query privileges
-
DeliveryOpen WebSocket /rpc connection
-
ExploitSend query with deeply nested type annotations
-
ExecutionTrigger unbounded recursion in kind parser
-
PersistExhaust server memory
-
ImpactCrash SurrealDB process (denial of service)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires an authenticated account with query-execution privileges (CVSS PR:L) and network reachability to a query endpoint - realistically the WebSocket /rpc endpoint, which imposes no body-size cap. The concrete trigger is a query carrying deeply nested type annotations (nested array<...>/option<...> kinds) in a cast or DEFINE FIELD statement that drives the type/kind parser past the intended object_recursion_limit. Limiting factors: exploitation is prevented on servers running 3.1.0+, blocked for user classes covered by --deny-arbitrary-query, and effectively infeasible through the HTTP /sql endpoint because its 1 MiB body limit caps achievable nesting depth below the OOM threshold. No user interaction is needed, but unauthenticated access alone is insufficient. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N, VA:H, VC:N/VI:N) is internally consistent with the description: network-reachable, low complexity, requires low privileges (an authenticated query user), and impacts availability only - no confidentiality or integrity loss. The 7.1 score reflects an easy, reliable single-message crash rather than data compromise. No EPSS score, KEV listing, POC, or SSVC decision data was supplied, so exploitation-probability signals are absent; the practical risk is elevated by the fact that this is an incomplete fix of an earlier recursion bug, meaning the pattern is known and the trigger is public in concept via the advisory. This is a genuine availability priority for internet-exposed or multi-tenant SurrealDB deployments where lower-trust users hold query privileges, but lower risk where only trusted operators can issue queries. Note the PR:L requirement limits this from being an unauthenticated internet-wide threat. |
| Exploit ScenarioDerived | An attacker who holds a valid low-privilege account with query-execution rights connects to the SurrealDB WebSocket /rpc endpoint and sends one query containing a type annotation nested hundreds or thousands of levels deep, such as a cast to array<option<array<option<...>>>>. The kind parser recurses without bound, memory is exhausted, and the server process crashes, taking down the database for all tenants. No public POC is identified at this time, but the trigger is straightforward given the described construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 20, 2026
Denial of service in SurrealDB before 3.1.0 lets an authenticated user with query-execution privileges crash the server with a single WebSocket message. The type/kind parser fails to enforce the configured recursion depth limit when parsing deeply nested type annotations (e.g. array<option<array<option<...>>>>), driving uncontrolled recursion that exhausts server memory and terminates the process. No public exploit identified at time of analysis and not listed in CISA KEV, but the flaw is trivially triggerable and is an incomplete fix of a previously patched bug class (GHSA-6r8p-hpg7-825g).
RemediationAI
Upgrade to SurrealDB 3.1.0 or later, which wraps parse_concrete_kind and the OPTION<...> arm of parse_inner_kind with the enter_object_recursion! guard to bound recursion at the configured object_recursion_limit (default 100); the fix is in commit 61d509b766afdf67cc26d8203fd7dc583c8d77aa (Vendor-released patch: 3.1.0). If immediate patching is not possible, restrict untrusted query execution using the --deny-arbitrary-query capability flag for the guest, record, and system user classes, accepting that this blocks legitimate ad-hoc queries for those classes. Alternatively, disable untrusted access to the WebSocket /rpc endpoint entirely, or route untrusted traffic only through the HTTP /sql endpoint, whose 1 MiB request body limit constrains nesting depth below the level needed to trigger OOM - at the cost of losing WebSocket RPC functionality for those users. See the advisory at https://github.com/surrealdb/surrealdb/security/advisories/GHSA-q8qp-67f9-wr3f.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo
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-based multi-model database that accepts SurrealQL queries over a WebSocket /rpc endpoint and an HTTP /sql endpoint. The root cause is CWE-674 (uncontrolled recursion): the type/kind parser recurses through the cycle parse_concrete_kind → parse_inner_kind → parse_inner_single_kind → parse_concrete_kind without applying the object_recursion_limit (default 100) that the expression parser already enforced. Because nested type annotations such as array<option<array<...>>> map directly onto this recursive descent, each nesting level consumes stack/heap until memory is exhausted. The affected component is the rust/surrealdb crate at versions below 3.1.0; CPE data was not provided, so affected identification relies on the vendor GHSA advisory and package range.
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:N/VA:H/SC:N/SI:N/SA:N
Network-reachable query endpoint (AV:N/AC:L), requires an authenticated query user (PR:L), no user interaction; impact is availability-only crash (A:H) with no confidentiality or integrity loss.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
2DescriptionCVE.org
SurrealDB before 3.1.0 fails to enforce recursion depth limits in the type/kind parser when processing nested type annotations. Authenticated attackers can send queries with deeply nested type annotations to exhaust server memory and crash the process.
Executive ViewAI
A denial-of-service vulnerability in SurrealDB versions before 3.1.0 allows authenticated database users to crash the server with a single message, disrupting any application or service dependent on the database. No public exploit has been identified at this time, but the flaw is trivially triggerable by any user with query-execution rights, creating material operational risk. With no vendor patch currently available, organizations using SurrealDB should immediately audit and restrict query access to essential accounts.
Restrict query-execution privileges to essential, trusted service accounts only; enforce authenticated session limits and per-connection memory constraints; deploy continuous monitoring for abnormal memory consumption patterns; implement hard containment boundaries using process-level memory limits and containerization (cgroups, Docker); maintain documented failover and rapid recovery procedures with defined RTO/RPO targets; isolate SurrealDB infrastructure on dedicated hardware or network segments to limit blast radius. No vendor-released patch identified at time of analysis.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo
SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow
Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an
Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read
SurrealDB releases before 4.0.0 fail to check query capability inside the embedded JavaScript bridge, so a low-privilege
SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete
Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a
Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
EUVD-2026-45930
GHSA-56pq-53x9-mxc4
NVD
CVE.org
EPSS
Exploit-DB