CVE-2025-71393

SurrealDB before 2.2.2 Memory Exhaustion via Nested Functions

Published Jul 18, 2026 CVSS 4.0 · 6 Medium EPSS < 1% KEV · Not listed
Description
SurrealDB before 2.2.2 with scripting enabled fails to properly enforce recursion limits when native functions contain embedded JavaScript that issues new queries. Authenticated attackers can bypass the recursion limit by chaining native and JavaScript function calls to trigger infinite recursion and exhaust server memory.

Analysis

AI-generated

Technical impact

SurrealDB versions before 2.2.2 allow nested calls to native functions that embed JavaScript to issue additional queries. When a user is authenticated and scripting is enabled, the server fails to enforce its recursion limit, letting attackers chain native and JavaScript calls until the recursion becomes infinite and server memory is exhausted. This flaw is a logic error captured by CWE-674, which can interrupt service availability and degrade performance for legitimate users.

Affected Systems

The vulnerability affects SurrealDB deployments with any version prior to 2.2.2. Only systems running those earlier releases with scripting capabilities enabled are susceptible.

Risk and Exploitability

With a CVSS score of 6, the flaw is considered a medium severity denial‑of‑service risk. The current EPSS score of less than 1% indicates a low probability of exploitation, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an authenticated session on a server that permits JavaScript execution within native functions; an attacker can trigger the recursion and exhaust memory by repeatedly invoking nested function calls.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SurrealDB to version 2.2.2 or later to restore proper recursion limits
  • If upgrading cannot be performed immediately, disable scripting or limit script execution to non‑recursing contexts for authenticated users
  • Configure system memory monitoring or enforce limits to detect and prevent the server from running out of memory due to unexpected recursion

Generated by OpenCVE AI on July 30, 2026 at 23:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

Type Values Removed Values Added
CPEs cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Surrealdb
Surrealdb surrealdb
Vendors & Products Surrealdb
Surrealdb surrealdb
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description SurrealDB before 2.2.2 with scripting enabled fails to properly enforce recursion limits when native functions contain embedded JavaScript that issues new queries. Authenticated attackers can bypass the recursion limit by chaining native and JavaScript function calls to trigger infinite recursion and exhaust server memory.
Title SurrealDB before 2.2.2 Memory Exhaustion via Nested Functions
Weaknesses CWE-674
References
Metrics cvssV4_0

{'score': 6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 29, 2026, 9:15 PM
Reserved
Jul 16, 2026, 12:14 PM
Status
Analyzed
Published
Jul 18, 2026, 2:17 PM
Modified
Oct 29, 2026, 9:17 PM