Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to SurrealDB with valid credentials
-
DeliveryVerify scripting capability is enabled on target server
-
ExploitCraft SurrealQL query invoking infinite-loop JavaScript function
-
ExecutionSubmit multiple concurrent scripting queries
-
PersistExhaust server worker threads and CPU resources
-
ImpactDeny service to legitimate database clients
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires two simultaneous conditions: first, the SurrealDB server must have the scripting capability explicitly enabled via --allow-scripting, --allow-all, SURREAL_CAPS_ALLOW_SCRIPT=true, or SURREAL_CAPS_ALLOW_ALL=true - scripting is disabled by default and cannot be exploited on default deployments; second, the attacker must possess valid SurrealDB credentials sufficient to submit queries (PR:L). The CVSS 4.0 AT:P metric formally captures the non-default configuration prerequisite. Exploitation is strictly limited to denial of service against server availability; no confidentiality or integrity impact is achievable through this vector. The attack is fully blocked on any default SurrealDB installation or any installation running --deny-scripting. |
| Impact | The vendor's CVSS 4.0 assessment (AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N, score 2.3) is internally consistent and matches cure53's independent Low severity rating. AT:P (attack requirements present) captures the critical limiting factor: the scripting capability must be non-default-enabled before any exploitation is possible. PR:L confirms authenticated access is required. The impact ceiling is VA:L - partial availability degradation of the vulnerable system only - with zero confidentiality or integrity impact. No CISA KEV listing exists, no public exploit code has been identified, and no EPSS score was provided. This is a genuinely low-priority finding: the combination of non-default configuration, authentication prerequisite, and limited blast radius means that the overwhelming majority of SurrealDB deployments are not exposed. Elevated concern applies only to operators running SurrealDB as a shared service where authenticated users include semi-trusted or untrusted parties. |
| Exploit ScenarioDerived | An authenticated user on a SurrealDB server where scripting has been explicitly enabled submits a SurrealQL query containing an infinite-loop JavaScript function - for example, a function body of while(true){} - and floods the server with multiple concurrent instances of such queries. The server's scripting workers are tied up indefinitely, preventing legitimate queries from executing and causing the database to become unresponsive. No public exploit code exists at time of analysis; the attack vector was identified during a controlled audit by cure53. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 18, 2026
Resource exhaustion in SurrealDB's embedded JavaScript scripting feature allows authenticated users to deny service by submitting long-running or infinite JavaScript functions that consume server CPU and thread resources without bound. Affected deployments must have explicitly enabled the scripting capability - it is off by default - making this a narrow but real risk in multi-tenant or shared SurrealDB environments where not all authenticated users are fully trusted. No public exploit identified at time of analysis; discovered during a professional code audit and penetration test conducted by cure53, rated Low severity by both cure53 and the vendor.
RemediationAI
Upgrade to SurrealDB 2.0.5, 2.1.5, or 2.2.2, which implement a default execution-time limit for JavaScript scripting functions. The fix (PR #5597: https://github.com/surrealdb/surrealdb/pull/5597) also exposes the SURREAL_SCRIPTING_MAX_TIME_LIMIT environment variable for operators who need to tune the timeout. For deployments that cannot immediately upgrade, disable scripting by starting SurrealDB with the --deny-scripting flag or by setting SURREAL_CAPS_DENY_SCRIPT=true; this workaround fully eliminates the attack surface but disables all embedded JavaScript function execution, which will break any SurrealQL queries that rely on scripting. The vendor advisory is at https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3824-qmfq-2qv7 and SurrealDB capability documentation is at https://surrealdb.com/docs/surrealdb/security/capabilities.
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 (cpe:2.3:a:surrealdb:surrealdb) is a Rust-based multi-model database that supports embedded JavaScript scripting functions via SurrealQL for advanced query logic. The root cause is CWE-770 (Allocation of Resources Without Limits or Throttling): while JS function execution was bounded for memory and stack size, no wall-clock execution-time limit was enforced. A submitted JavaScript function could therefore run indefinitely, tying up server workers. The fix, implemented in PR #5597, introduces a default execution-time timeout for scripting functions, configurable via the SURREAL_SCRIPTING_MAX_TIME_LIMIT environment variable. The scripting subsystem is activated by the --allow-scripting or --allow-all flags, or equivalently by the SURREAL_CAPS_ALLOW_SCRIPT=true or SURREAL_CAPS_ALLOW_ALL=true environment variables.
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:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Non-default scripting configuration is a meaningful prerequisite mapped to AC:H; PR:L for required authentication; availability impact is partial only with no C or I impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 does not enforce a default execution-time limit on embedded JavaScript scripting functions when the scripting capability is explicitly enabled (via --allow-scripting or --allow-all). An authenticated attacker can submit long-running JavaScript functions to exhaust server resources and cause a denial of service. Scripting is disabled by default.
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-2025-210487
GHSA-6g9r-xqrf-34xh
NVD
CVE.org
EPSS
VulDB
Exploit-DB