LiveActive security incident?Get immediate response
CVE Record

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

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.

HighCVSS 7.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

An authenticated SurrealDB user with OWNER or EDITOR permissions can create a database function that monopolizes server CPU. The database may stop serving queries and connections, and configured timeouts do not halt the workload. Recovery may require a manual restart, creating a material availability risk.

Executive priority

Prioritize remediation for production, shared, or externally reachable databases where privileged credentials could be misused. The vulnerability does not indicate data theft, but a single authorized or compromised account could cause sustained service disruption. Upgrade promptly and reduce privileged access while scheduling remediation.

Technical view

CVE-2025-71397 is a CWE-835 CPU-exhaustion flaw in SurrealDB custom functions. Nested FOR loops bypass the practical protection provided by individual loop limits. A privileged authenticated user can trigger sustained CPU consumption remotely, causing denial of service without compromising data confidentiality or integrity.

Likely exposure

Exposure exists where affected SurrealDB versions permit potentially untrusted or compromised accounts with OWNER or EDITOR rights at root, namespace, or database scope. Internet exposure increases reachability, but internal and multi-tenant deployments remain relevant because authentication and elevated database permissions are required.

Exploitation context

The supplied sources do not report active exploitation, and the CVE is not identified as being in CISA KEV. Exploitation requires authentication and OWNER or EDITOR permissions, but has low stated complexity and needs no user interaction. Successful abuse can make the server unavailable until restarted.

Researcher notes

Affected releases are SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2. CVSS 4.0 is 7.1 with high vulnerable-system availability impact. Testing should remain non-disruptive because configured timeouts reportedly cannot terminate the CPU-consuming execution.

Mitigation direction

  • Upgrade affected branches to 2.0.5, 2.1.5, or 2.2.2 respectively, or a later vendor-supported release.
  • Restrict OWNER and EDITOR permissions to trusted accounts with a documented operational need.
  • Review custom database functions and remove unnecessary definitions created by privileged users.
  • Monitor CPU saturation and database responsiveness until upgrades are complete.
  • Follow the SurrealDB vendor advisory for any additional remediation guidance.

Validation and detection

  • Inventory every SurrealDB deployment and record its exact version and branch.
  • Identify accounts holding OWNER or EDITOR permissions at root, namespace, and database levels.
  • Audit custom function definitions for unexpected nested loops or unexplained recent changes.
  • Confirm upgraded instances report a fixed or later vendor-supported version.
  • Verify monitoring detects CPU saturation and operations personnel can safely restart affected services.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-835: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Database behavior lookup

The CVE wording references database injection or access, so collection and exfiltration review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-71397 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.1 (4.0)
Known Exploited
No
Published

Vector: 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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.1CVSS 4.0HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NVulnCheck

Vulnerability scoring details

Base CVSS 4.0 score

7.1High
CVSS 4.0 vector shape for CVE-2025-71397Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: 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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
surrealdbsurrealdb0, 2.2.2unaffected
surrealdbsurrealdb0, 2.1.5unaffected
surrealdbsurrealdb0, 2.0.5unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-835 · source CWE mapping

Loop with Unreachable Exit Condition ('Infinite Loop')

Loop with Unreachable Exit Condition ('Infinite Loop') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.