CVE-2026-63737 — Vulnerability in surrealdb — CVE Details
SurrealDB: Denial of Service via deep operator chains
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.49%). Schedule for your next planned update.
Does your project use an affected surrealdb version?
Paste your Cargo.lock to check it for CVE-2026-63737 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
An authenticated user could crash a SurrealDB server with a single query containing a long chain of operators.
Such a query — for example RETURN 1 + 1 + 1 + ... with tens of thousands of terms — is parsed into an expression tree one level deep per operator. Because the chain is flat and the pratt parser appends to it iteratively, the configured query- and object-recursion limits never fire, so the tree grows unbounded with the length of the query.
The root cause: the over-deep tree is later walked recursively, one call per node, when it is dropped, formatted, or lowered for execution — overflowing the thread stack and aborting the process.
Impact
An authenticated user with query-execution privileges can crash a SurrealDB server with a single query containing a long chain of operators. The whole process aborts, denying service to every namespace and database on that instance until it is restarted. The crash occurs during query processing, before any data is read or written (availability only).
Patches
A patch introduces a dedicated expression-depth budget — expr_recursion_limit, sourced from max_expression_parsing_depth (default 128, configurable via SURREAL_MAX_EXPRESSION_PARSING_DEPTH). It is charged once per pratt-parser level and once per operator appended to the spine, so an over-deep operator chain is rejected with a syntax error instead of building a tree that overflows the stack downstream. Paths that re-parse already-validated stored data are exempted, so existing databases with deep stored expressions still load.
- Versions 3.1.5 and later are not affected by this issue.
Workarounds
Users unable to patch should consider the following workarounds:
- Restrict the ability of untrusted users to execute arbitrary queries via the
--deny-arbitrary-querycapability flag for the affected user classes (guest, record, or system). - Restrict untrusted access to the WebSocket
/rpcendpoint, which accepts larger request bodies than the HTTP/sqlendpoint. The/sqlendpoint's 1 MiB body limit lowers the achievable operator depth but does not by itself guarantee the stack cannot be exhausted. - Run SurrealDB under an orchestrator or process manager that restarts it automatically on exit (e.g. Kubernetes, systemd
Restart=on-failure, or a Docker restart policy), so the server recovers immediately after a crash. This limits downtime from a successful attack but does not prevent the crash.
References
- SurrealQL Documentation — Operators
fix(syn): bound expression operator-tree depth to prevent stack-overflow DoS
Advisory Timeline
- First published June 19, 2026 (160 days ago).
- Last revised November 4, 2026 — 137 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
cargo update -p surrealdb --precise 3.1.5
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Fixed In |
|---|---|
| surrealdb crates.io · Affected: All versions | 3.1.5 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-674
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
References
Frequently Asked Questions
- What is CVE-2026-63737?
- SurrealDB: Denial of Service via deep operator chains. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
- How do I check if my project is affected by CVE-2026-63737?
- CVE-2026-63737 affects surrealdb. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-63737 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 34.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-71392CRITICAL
SurrealDB server-takeover via SurrealQL injection on backup import
- CVE-2026-63739HIGH
SurrealDB: Arbitrary file read via DEFINE ANALYZER mapper() filter
- CVE-2024-58368HIGH
Uncaught Exception processing HTTP Headers in SurrealDB
- CVE-2026-63743MEDIUM
SurrealDB: Port-specific --deny-net rules silently bypassed on HTTP redirect
- CVE-2026-63755MEDIUM
SurrealDB: Scraping a TABLE with no available PERMISSIONS to current auth level
- CVE-2024-58363MEDIUM
SurrealDB vulnerable to Improper Authentication when Changing Databases as Scope User
- CVE-2024-58357MEDIUM
SurrealDB has an Uncaught Exception in Function Generating Random Time
- CVE-2025-71390MEDIUM
SurrealDB allows bypass of deny-net flags via DNS resolution