Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2025-71397
Published:July 18, 2026
Updated:August 06, 2026
SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 allows authenticated users with OWNER or EDITOR permissions (at the root, namespace, or database level) to define custom database functions via DEFINE FUNCTION using nested FOR loops. Although a single loop's iteration count is constrained, nesting multiple loops (e.g., each with 1,000,000 iterations) is not, so an attacker can execute a function that consumes all server CPU time. Configured timeouts do not stop the execution, rendering the server unresponsive to other queries and connections until it is manually restarted.
Affected Packages
https://github.com/surrealdb/surrealdb.git (GITHUB):
Affected version(s) >=v2.1.0 <v2.1.5
Fix Suggestion:
Update to version v2.1.5
https://github.com/surrealdb/surrealdb.git (GITHUB):
Affected version(s) >=v2.2.0 <v2.2.2
Fix Suggestion:
Update to version v2.2.2
https://github.com/surrealdb/surrealdb.git (GITHUB):
Affected version(s) >=v1.0.0 <v2.0.5
Fix Suggestion:
Update to version v2.0.5
surrealdb (RUST):
Affected version(s) >=1.0.0-beta.1 <2.0.5
Fix Suggestion:
Update to version 2.0.5
surrealdb-core (RUST):
Affected version(s) >=2.1.0 <2.1.5
Fix Suggestion:
Update to version 2.1.5
surrealdb (RUST):
Affected version(s) >=2.2.0 <2.2.2
Fix Suggestion:
Update to version 2.2.2
surrealdb-core (RUST):
Affected version(s) >=1.1.1 <2.0.5
Fix Suggestion:
Update to version 2.0.5
surrealdb (RUST):
Affected version(s) >=2.1.0 <2.1.5
Fix Suggestion:
Update to version 2.1.5
surrealdb-core (RUST):
Affected version(s) >=2.2.0 <2.2.2
Fix Suggestion:
Update to version 2.2.2
Do you need more information?
Contact Us
CVSS v4
Base Score:
7.1
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
6.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
Loop with Unreachable Exit Condition ('Infinite Loop')
EPSS
Base Score:
0.29