CVE-2025-71395: SurrealDB before 2.2.2 Memory Exhaustion via string::replace
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.
Security readout for executives and security teams
Plain-English summary
An authenticated user can submit a crafted SurrealDB query that makes the server allocate excessive memory. The database may slow, crash, or become unavailable, disrupting applications that depend on it. The supplied assessment rates this high severity because exploitation is remote and requires only low privileges, although it does not expose or alter data directly.
Executive priority
Prioritize remediation for production or shared SurrealDB systems because a low-privileged authenticated account could interrupt database availability. Upgrade promptly where service outages would affect customers or critical operations. Investigate memory-related crashes, but do not treat them alone as proof of exploitation.
Technical view
SurrealDB before 2.2.2 does not adequately limit output growth in string::replace when regex patterns are used. A malicious authenticated query can trigger unbounded string allocations, exhaust server memory, and cause denial of service. The supplied CVSS 4.0 score is 7.1, with high availability impact and no stated confidentiality or integrity impact.
Likely exposure
Exposure is most likely where users, applications, or tenants have authenticated network access and can submit SurrealDB queries using string::replace. Internet reachability increases opportunity but is not required. Systems running 2.2.2 or later are outside the described “before 2.2.2” scope.
Exploitation context
The supplied sources do not report active exploitation, and the CVE is not listed as KEV in the bundle. Exploitation requires authentication and query capability but reportedly has low complexity and needs no user interaction. Evidence about public proof-of-concept availability is not provided.
Researcher notes
The weakness maps to CWE-789 and concerns uncontrolled memory allocation during regex-based replacement. The supplied affected-version entries are ambiguously formatted and include multiple thresholds, while the title and description identify versions before 2.2.2. Confirm branch-specific status against the vendor advisory before closing findings.
Mitigation direction
Upgrade SurrealDB to version 2.2.2 or later, following the vendor advisory.
Restrict query access to trusted identities and apply least-privilege permissions.
Limit unnecessary network access to SurrealDB services.
Monitor database memory consumption, process termination, and unexpected restarts.
Check vendor guidance for any branch-specific remediation requirements.
Validation and detection
Inventory every SurrealDB deployment and record its exact installed version.
Confirm exposed instances require authentication and restrict query-capable accounts.
Verify upgraded instances report version 2.2.2 or later.
Review telemetry for abnormal memory growth, out-of-memory events, or repeated restarts.
Use safe non-production testing to confirm resource controls without reproducing denial of service.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-789: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-789 · source CWE mapping
Memory Allocation with Excessive Size Value
Memory Allocation with Excessive Size Value represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.