CVE-2025-71397
HIGH 7.1CVSS 4.0SurrealDB CPU exhaustion via custom functions result in total DoS
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.
- Published
- 18 Jul 2026
- Last modified
- 29 Oct 2026
- Assigned by
- disclosure@vulncheck.com
- NVD status
- Analyzed
- Weakness
- CWE-835
- Also known as
- GHSA-pxw4-94j3-v9pf
- Sources
- NVDJSONOSV GHSA-pxw4-94j3-v9pfJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 4.0 | HIGH 7.1 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | surrealdb | surrealdbcpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:* |
< 2.0.5 | 2.0.5 |
| NVD | surrealdb | surrealdbcpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:* |
>= 2.1.0, < 2.1.5 | 2.1.5 |
| NVD | surrealdb | surrealdbcpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:* |
>= 2.2.0, < 2.2.2 | 2.2.2 |
| OSV | crates.io | surrealdb | >= 2.2.0, < 2.2.2 | 2.2.2 |
| OSV | crates.io | surrealdb | >= 2.1.0, < 2.1.5 | 2.1.5 |
| OSV | crates.io | surrealdb | < 2.0.5 | 2.0.5 |
References
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pxw4-94j3-v9pf · Vendor Advisory, WEB
- https://www.vulncheck.com/advisories/surrealdb-before-cpu-exhaustion-via-nested-for-loops · Third Party Advisory
- https://github.com/surrealdb/surrealdb/pull/5597 · WEB
- https://github.com/surrealdb/surrealdb · PACKAGE
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 18 Jul 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 11 Apr 2025)