Skip to main content

SurrealDB CVE-2025-71395

| EUVDEUVD-2025-210486 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-07-18 VulnCheck GHSA-849x-5qr7-wxfm
7.1
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
7.1 HIGH
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
6.5 MEDIUM

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
X

Lifecycle Timeline

4
Patch available
Jul 18, 2026 - 15:17 EUVD
Source Code Evidence Fetched
Jul 18, 2026 - 14:07 vuln.today
Analysis Generated
Jul 18, 2026 - 14:07 vuln.today
CVE Published
Jul 18, 2026 - 13:10 cve.org
HIGH 7.1

DescriptionCVE.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.

AnalysisAI

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.

Technical ContextAI

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.

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.

CVE-2025-71392 CRITICAL
9.4 Jul 18

Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica

CVE-2026-63756 CRITICAL
9.2 Jul 20

Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act

CVE-2026-63760 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web

CVE-2026-63747 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi

CVE-2026-63757 HIGH
8.7 Jul 20

Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the

CVE-2026-63735 HIGH POC
8.6 Jul 20

Cross-tenant authorization bypass in SurrealDB before 3.2.0 lets any authenticated user reach custom API endpoints belon

CVE-2026-63739 HIGH
8.3 Jul 20

Arbitrary file read in SurrealDB before 3.1.5 lets an authenticated database user holding the EDITOR or OWNER role discl

CVE-2026-63763 HIGH
7.5 Jul 20

Confused-deputy privilege escalation in SurrealDB before 2.5.0 and before 3.0.0-beta.3 lets a low-privileged user (e.g.

CVE-2026-63737 HIGH
7.1 Jul 20

Denial of service in SurrealDB before 3.1.5 lets an authenticated user with query-execution privileges crash the entire

CVE-2025-71397 HIGH
7.1 Jul 18

Denial of service in SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 lets an authenticated user with

CVE-2026-63746 HIGH
7.1 Jul 20

Information disclosure in SurrealDB before 3.1.0 allows authenticated record or scope users to bypass table-level SELECT

CVE-2025-71391 HIGH
7.1 Jul 18

Denial of service in SurrealDB before 2.2.2 allows any authenticated user to crash the database by submitting a crafted

Share

CVE-2025-71395 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy