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

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Mon, 20 Jul 2026 18: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 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'}


Subscriptions

Surrealdb Surrealdb
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

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

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

Link: CVE-2025-71393

cve-icon Vulnrichment

Updated: 2026-07-20T17:16:25.950Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:15:06Z

Weaknesses