CVE-2025-71397
Last modified
CVE-2025-71397 is a high-severity vulnerability rated 7.1/10 on the CVSS scale. 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. EPSS estimates a 0.29% chance of exploitation in the next 30 days.
Description
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.
Metrics
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| surrealdb | surrealdb | < 2.2.2 |
| surrealdb | surrealdb | < 2.1.5 |
| surrealdb | surrealdb | < 2.0.5 |
References
Timeline
- Published
- Last Modified
- Status
- Awaiting Analysis
Frequently Asked Questions
What is CVE-2025-71397?
How severe is CVE-2025-71397?
How do I fix CVE-2025-71397?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-71391SurrealDB versions before 2.2.2 contain an uncaught exceptio…7.1
- CVE-2025-71392SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before…9.4
- CVE-2025-71393SurrealDB before 2.2.2 with scripting enabled fails to prope…6
- CVE-2025-71394SurrealDB versions before 2.2.2 contain a local file read vu…2.3
- CVE-2025-71395SurrealDB versions before 2.2.2 contain a memory exhaustion …7.1
- CVE-2025-71396SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before…2.3
- CVE-2025-71398SurrealDB before 2.2.2 fails to validate HTTP redirects in h…5.8
- CVE-2025-71399Better Auth relies on better-call, which uses the rou3 route…8.8
- CVE-2025-7140A vulnerability classified as problematic has been found in …5.4
- CVE-2025-71400better-auth passkey versions before 1.4.0 contain an insecur…7.1
- CVE-2025-71401better-auth (npm) before 1.4.2 allows an external request to…9.3
- CVE-2025-71402better-auth versions greater than 1.3.34 and before 1.4.0 co…2
Are you affected by CVE-2025-71397?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
