CVE-2025-71393 Details
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.
A vulnerability exists in SurrealDB versions prior to 2.2.2, 2.1.5, and 2.0.5, when scripting is enabled. The issue arises because the database fails to properly enforce recursion limits. Authenticated attackers can exploit this by chaining native functions with embedded JavaScript that issues new queries, creating infinite recursion that exhausts server memory. This vulnerability only affects SurrealDB instances with scripting capabilities enabled, either through command-line flags or environment variables.
Users can upgrade to SurrealDB versions 2.2.2, 2.1.5, or 2.0.5 to address this vulnerability. Alternatively, SurrealDB can be configured to deny the execution of embedded scripting functions by using the `--deny-scripting` flag or the environment variable `SURREAL_CAPS_DENY_SCRIPT=true`.
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 20, 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-m7rc-8w7m-r9qr | [email protected] | Vendor Advisory |
| https://www.vulncheck.com/advisories/surrealdb-before-memory-exhaustion-via-nested-functions | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-674 | Uncontrolled Recursion | [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
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 29, 2026 | CVE Modified | [email protected] |
| Sep 29, 2026 | CVE Translated | [email protected] |
| Aug 13, 2026 | Reanalysis | [email protected] |
| Aug 13, 2026 | Initial Analysis | [email protected] |
| Jul 20, 2026 | CVE Modified | CISA-ADP |
| Jul 18, 2026 | New CVE Received | [email protected] |