CVE-2025-71395 Details
Description
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.
A memory exhaustion vulnerability has been identified in SurrealDB versions prior to 2.2.2. This issue arises in the string::replace function, which fails to limit the length of resulting strings when regex patterns are used. An authenticated attacker can exploit this by crafting a malicious query that leads to unbounded string allocations, exhausting server memory and causing a denial-of-service condition.
Users can update to SurrealDB versions 2.2.2, 2.1.5, or 2.0.5 to address this vulnerability. For those unable to update, it is recommended to limit the use of the string::replace function in the affected versions by using the --deny-functions flag or the SURREAL_CAPS_DENY_FUNC environment variable.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3633-g6mg-p6qq | [email protected] | Vendor Advisory |
| https://www.vulncheck.com/advisories/surrealdb-before-memory-exhaustion-via-string-replace | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-789 | Memory Allocation with Excessive Size Value | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| surrealdb surrealdb | < 2.0.5 >= 2.1.0, < 2.1.5 >= 2.2.0, < 2.2.2 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 29, 2026 | CVE Modified | [email protected] |
| Sep 29, 2026 | CVE Translated | [email protected] |
| Aug 19, 2026 | Initial Analysis | [email protected] |
| Jul 22, 2026 | CVE Modified | CISA-ADP |
| Jul 18, 2026 | New CVE Received | [email protected] |