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.
Published: 2026-07-18
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

SurrealDB versions prior to 2.2.2 have a memory exhaustion vulnerability in the string::replace function when regex patterns are used. An authenticated attacker can craft a malicious query that causes unbounded string allocations, exhausting server memory and resulting in a denial of service. The flaw stems from a lack of length restriction on the output of the replace operation, allowing excessive allocation, and is classified as CWE‑789.

Affected Systems

SurrealDB is the affected product. Any deployment using a version earlier than 2.2.2 is vulnerable. No other software modules or components are listed as affected.

Risk and Exploitability

The CVSS score of 7.1 indicates a high severity vulnerability. The EPSS score is less than 1%, implying a low current exploitation probability, and the vulnerability is not cataloged in CISA's KEV. Exploitation requires authenticated access to SurrealDB; the attacker must submit a specifically crafted query to trigger large memory allocations and force the service to become unresponsive.

Generated by OpenCVE AI on August 1, 2026 at 08:10 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest SurrealDB release (2.2.2 or newer) to fix the CWE-789 identified memory exhaustion flaw, which adds length restrictions to the string::replace operation.
  • After updating, restart the SurrealDB service to load the patched binary.
  • Limit access to SurrealDB to trusted administrators until the upgrade is complete, preventing unauthenticated users from sending malicious queries that could trigger the vulnerability.

Generated by OpenCVE AI on August 1, 2026 at 08:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Jul 2026 02:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Surrealdb
Surrealdb surrealdb
Vendors & Products Surrealdb
Surrealdb surrealdb

Wed, 22 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 18 Jul 2026 13:45:00 +0000

Type Values Removed Values Added
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.
Title SurrealDB before 2.2.2 Memory Exhaustion via string::replace
Weaknesses CWE-789
References
Metrics cvssV4_0

{'score': 7.1, 'vector': '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'}


Subscriptions

Surrealdb Surrealdb
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-28T01:48:18.301Z

Reserved: 2026-07-16T12:14:41.770Z

Link: CVE-2025-71395

cve-icon Vulnrichment

Updated: 2026-07-22T19:09:32.077Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T08:15:03Z

Weaknesses
  • CWE-789

    Memory Allocation with Excessive Size Value