Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to SurrealDB endpoint
-
DeliveryCraft string::replace regex query
-
ExploitSubmit query to server
-
ExecutionTrigger unbounded string allocation
-
PersistExhaust server memory
-
ImpactCrash database (denial of service)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
|
| Exploitation Conditions | Exploitation requires an authenticated session (CVSS PR:L) with the ability to run SurrealQL queries that invoke the string::replace function with a regex pattern, against a vulnerable version (before 2.0.5, 2.1.0-2.1.4, or 2.2.0-2.2.1). Limiting factors: the attacker must be able to authenticate and must not be blocked by capability restrictions - deployments that already deny string::replace via --deny-functions / SURREAL_CAPS_DENY_FUNC, or that do not expose query access to untrusted users, are not practically exploitable. No user interaction and no administrative privilege beyond a function-capable authenticated account are needed. |
| Impact | The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H, score 7.1 High) describes a low-complexity, network-reachable attack that requires authentication (PR:L), needs no user interaction, and produces high availability impact with zero confidentiality or integrity impact - a pure DoS. No EPSS score, KEV entry, POC, or SSVC data was supplied, so exploitation probability cannot be quantified from the input, and there is no public exploit identified at time of analysis nor evidence of active exploitation. Real-world priority is moderate rather than critical: the requirement for a valid, function-capable authenticated session narrows who can trigger it, but the attack itself is trivial (a single crafted query) and the outcome is a full server crash, so any deployment that grants query access to untrusted or semi-trusted principals should treat this as a genuine availability risk and not dismiss it as a high-CVSS-but-low-real-risk issue. |
| Exploit ScenarioDerived | An attacker holding valid credentials - or having compromised a low-privilege application account - connects to the SurrealDB endpoint and submits a single SurrealQL query invoking string::replace with a regex pattern crafted to expand the output string without bound. The server allocates memory until it is exhausted and the process is killed, taking the database offline for all users; no elevated privileges or user interaction are required, and no public exploit code is needed to reproduce it given the low attack complexity (AC:L). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 18, 2026
Denial of service in SurrealDB before 2.2.2 lets an authenticated user crash the database by calling the string::replace function with a regex pattern that produces an unbounded output string, exhausting server memory. The flaw spans the 2.0.x, 2.1.x, and 2.2.x release lines and was discovered during a cure53 security audit; there is no public exploit identified at time of analysis and it is not listed in CISA KEV. Impact is availability-only with no confidentiality or integrity loss, rated CVSS 4.0 7.1 High.
RemediationAI
Upgrade to the fixed release on your branch - SurrealDB 2.0.5, 2.1.5, or 2.2.2 (or later) - each of which enforces a string-length ceiling via SURREAL_GENERATION_ALLOCATION_LIMIT; the fixes landed in pull requests https://github.com/surrealdb/surrealdb/pull/5619 and https://github.com/surrealdb/surrealdb/pull/5638. If immediate upgrade is not possible, the vendor-recommended workaround is to prevent untrusted clients from calling the vulnerable function by denying it in SurrealDB capabilities using the --deny-functions flag or the equivalent SURREAL_CAPS_DENY_FUNC environment variable (see https://surrealdb.com/docs/surrealdb/security/capabilities#functions and https://surrealdb.com/docs/surrealdb/cli/env); the side effect is that any legitimate application logic relying on string::replace will stop working, so scope the deny rule to that specific function rather than blanket-denying string functions. As additional containment, restrict database access to trusted authenticated principals and run SurrealDB under an OS/container memory limit so a single crash does not destabilize the host.
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 exposes the SurrealQL query language, which ships built-in string functions. The string::replace function accepts a regular-expression pattern for match-and-replace, but the implementation did not cap the size of the resulting allocated string. This is a textbook CWE-789 (Memory Allocation with Excessive Size Value): an attacker-controlled operation drives an allocation whose size is not bounded against any limit, so a query that expands a string enormously forces the server to allocate memory until the process is starved. The remediation adds a configurable ceiling exposed as SURREAL_GENERATION_ALLOCATION_LIMIT. The affected component is cpe:2.3:a:surrealdb:surrealdb across the vulnerable version ranges.
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 low-complexity query needing a valid low-privilege authenticated session (PR:L), no interaction, availability-only impact so C:N/I:N/A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
SurrealDB versions before 2.2.2 contain a memory exhaustion vulnerability in the string::replace function that fails to restrict resulting string length when using regex patterns. An authenticated attacker can craft a malicious query to exhaust server memory through unbounded string allocations, causing denial of service.
Executive ViewAI
SurrealDB versions 2.0.x through 2.2.0 contain a database crash vulnerability exploitable by authenticated users, creating unplanned downtime risk for applications relying on affected instances. This disrupts service availability without compromising data confidentiality or integrity. Organizations must immediately restrict database access and coordinate with SurrealDB for patch availability.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Network segmentation-restrict database connectivity to trusted application servers via firewall rules only; (2) Access enforcement-require strong authentication for all database users, audit roles monthly, remove unnecessary administrative privileges; (3) Monitoring and alerting-enable query logging with automated alerts for anomalous database access patterns; (4) Resource protection-set memory limits and configure automatic failover or restart on threshold breach; (5) Connection pooling with configurable query timeouts to constrain resource exhaustion exposure.
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-210486
GHSA-849x-5qr7-wxfm
NVD
CVE.org
EPSS
VulDB
Exploit-DB