{"id":"EUVD-2025-210488","enisaUuid":"85a8ce87-83a9-3579-abf0-e196150ce1e4","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\u0027s 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.","datePublished":"Jul 18, 2026, 1:10:15 PM","dateUpdated":"Oct 29, 2026, 9:15:23 PM","baseScore":7.1,"baseScoreVersion":"4.0","baseScoreVector":"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","references":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pxw4-94j3-v9pf\nhttps://www.vulncheck.com/advisories/surrealdb-before-cpu-exhaustion-via-nested-for-loops\n","aliases":"CVE-2025-71397\nGHSA-33m9-4q46-9q55\n","assigner":"VulnCheck","epss":0.55,"enisaIdProduct":[{"id":"97986821-d201-318e-9137-bdc55e2ba983","product":{"name":"surrealdb","vendor":{"name":"surrealdb"}},"product_version":"0 \u003c2.0.5"},{"id":"db7d55c0-e742-35f7-8b01-688d15afe671","product":{"name":"surrealdb","vendor":{"name":"surrealdb"}},"product_version":"2.1.0 \u003c2.1.5"},{"id":"e8f4bca1-9b28-3f39-8b7d-6132cd9c8390","product":{"name":"surrealdb","vendor":{"name":"surrealdb"}},"product_version":"2.2.0 \u003c2.2.2"}],"enisaIdVendor":[{"id":"d16dde56-cc9d-3ef8-ac03-96d9bc239f81","vendor":{"name":"surrealdb"}}],"enisaIdVulnerability":[{"id":"f2665b17-118f-3738-b68c-2943c962812c","vulnerability":{"id":"CVE-2025-71397","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\u0027s 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.","datePublished":"Jul 18, 2026, 1:10:15 PM","dateUpdated":"Oct 29, 2026, 9:15:23 PM","status":"PUBLISHED","baseScore":7.1,"baseScoreVersion":"4.0","baseScoreVector":"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","references":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pxw4-94j3-v9pf\nhttps://www.vulncheck.com/advisories/surrealdb-before-cpu-exhaustion-via-nested-for-loops\n","enisa_id":"EUVD-2025-210488\n","assigner":"VulnCheck","epss":0.55,"dataProcessed":"Nov 2, 2026, 7:20:18 AM","vulnerabilityProduct":[{"id":"066b66ab-6982-35b1-9359-c4c30d5717ac","product":{"name":"surrealdb","vendor":{"name":"surrealdb"}},"product_version":"2.1.0 \u003c2.1.5"},{"id":"0ebb52b3-d3ae-3eeb-b00e-6018d9155c6a","product":{"name":"surrealdb","vendor":{"name":"surrealdb"}},"product_version":"2.2.0 \u003c2.2.2"},{"id":"1385f3ab-05bf-30e6-87a8-89512b70518c","product":{"name":"surrealdb","vendor":{"name":"surrealdb"}},"product_version":"0 \u003c2.0.5"}],"vulnerabilityVendor":[{"id":"699b219c-6a34-32c6-83cf-af5b765d067f","vendor":{"name":"surrealdb"}}]}},{"id":"ff9be530-0d9d-3521-bce7-823c629277a4","vulnerability":{"id":"GHSA-33m9-4q46-9q55","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\u0027s 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.","datePublished":"Jul 18, 2026, 3:31:49 PM","dateUpdated":"Aug 13, 2026, 3:34:13 PM","baseScore":0.0,"references":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pxw4-94j3-v9pf\nhttps://nvd.nist.gov/vuln/detail/CVE-2025-71397\nhttps://www.vulncheck.com/advisories/surrealdb-before-cpu-exhaustion-via-nested-for-loops\n","enisa_id":"EUVD-2025-210488\n","aliases":"GHSA-33m9-4q46-9q55\nCVE-2025-71397\n","epss":0.0,"dataProcessed":"Nov 1, 2026, 2:02:28 AM","vulnerabilityProduct":[],"vulnerabilityVendor":[]}}],"enisaIdAdvisory":[]}