Skip to main content
← All vulnerabilities
CVE-2025-71397GHSA-PXW4-94J3-V9PF

SurrealDB before 2.2.2 CPU Exhaustion via nested FOR loops

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.2.2, 2.1.5, 2.0.5
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • surrealdb surrealdb

    From 2.2.0 · fixed in 2.2.2

  • surrealdb surrealdb

    From 2.1.0 · fixed in 2.1.5

  • surrealdb surrealdb

    fixed in 2.0.5

  • surrealdbcrates.io

    From 2.2.0 · fixed in 2.2.2

  • surrealdbcrates.io

    From 2.1.0 · fixed in 2.1.5

  • surrealdbcrates.io

    fixed in 2.0.5

References 2

GitHub · surrealdb/surrealdb

vulncheck.com