Back to CVE records
High 7.1Published Jul 18, 2026

CVE-2025-71397SurrealDB before 2.2.2 CPU Exhaustion via nested FOR loops

Updated under an hour ago ()

Does this affect you?

It affects surrealdb. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

CVSS
7.1 HIGH (v4.0, CNA)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
Weakness (CWE)
CWE-835
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
VulnCheck
NVD analysis
Analyzed
Record last updated
Oct 8, 2026
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
surrealdb surrealdb
surrealdb:surrealdb (from the name)
before 2.2.2; 2.2.2 not affected
CNA record
surrealdb surrealdb
surrealdb:surrealdb
before 2.0.5; from 2.1.0 before 2.1.5; from 2.2.0 before 2.2.2
NVD

References

  • vendor-advisory
  • third-party-advisory

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.