Skip to main content

SurrealDB CVE-2025-71396

| EUVDEUVD-2025-210487 LOW
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-07-18 VulnCheck GHSA-6g9r-xqrf-34xh
2.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to SurrealDB with valid credentials
  2. Delivery
    Verify scripting capability is enabled on target server
  3. Exploit
    Craft SurrealQL query invoking infinite-loop JavaScript function
  4. Execution
    Submit multiple concurrent scripting queries
  5. Persist
    Exhaust server worker threads and CPU resources
  6. Impact
    Deny service to legitimate database clients

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires two simultaneous conditions: first, the SurrealDB server must have the scripting capability explicitly enabled via --allow-scripting, --allow-all, SURREAL_CAPS_ALLOW_SCRIPT=true, or SURREAL_CAPS_ALLOW_ALL=true - scripting is disabled by default and cannot be exploited on default deployments; second, the attacker must possess valid SurrealDB credentials sufficient to submit queries (PR:L). The CVSS 4.0 AT:P metric formally captures the non-default configuration prerequisite. Exploitation is strictly limited to denial of service against server availability; no confidentiality or integrity impact is achievable through this vector. The attack is fully blocked on any default SurrealDB installation or any installation running --deny-scripting.

Impact

The vendor's CVSS 4.0 assessment (AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N, score 2.3) is internally consistent and matches cure53's independent Low severity rating. AT:P (attack requirements present) captures the critical limiting factor: the scripting capability must be non-default-enabled before any exploitation is possible. PR:L confirms authenticated access is required. The impact ceiling is VA:L - partial availability degradation of the vulnerable system only - with zero confidentiality or integrity impact. No CISA KEV listing exists, no public exploit code has been identified, and no EPSS score was provided. This is a genuinely low-priority finding: the combination of non-default configuration, authentication prerequisite, and limited blast radius means that the overwhelming majority of SurrealDB deployments are not exposed. Elevated concern applies only to operators running SurrealDB as a shared service where authenticated users include semi-trusted or untrusted parties.

Exploit ScenarioDerived

An authenticated user on a SurrealDB server where scripting has been explicitly enabled submits a SurrealQL query containing an infinite-loop JavaScript function - for example, a function body of while(true){} - and floods the server with multiple concurrent instances of such queries. The server's scripting workers are tied up indefinitely, preventing legitimate queries from executing and causing the database to become unresponsive. No public exploit code exists at time of analysis; the attack vector was identified during a controlled audit by cure53.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 18, 2026

Resource exhaustion in SurrealDB's embedded JavaScript scripting feature allows authenticated users to deny service by submitting long-running or infinite JavaScript functions that consume server CPU and thread resources without bound. Affected deployments must have explicitly enabled the scripting capability - it is off by default - making this a narrow but real risk in multi-tenant or shared SurrealDB environments where not all authenticated users are fully trusted. No public exploit identified at time of analysis; discovered during a professional code audit and penetration test conducted by cure53, rated Low severity by both cure53 and the vendor.

RemediationAI

Upgrade to SurrealDB 2.0.5, 2.1.5, or 2.2.2, which implement a default execution-time limit for JavaScript scripting functions. The fix (PR #5597: https://github.com/surrealdb/surrealdb/pull/5597) also exposes the SURREAL_SCRIPTING_MAX_TIME_LIMIT environment variable for operators who need to tune the timeout. For deployments that cannot immediately upgrade, disable scripting by starting SurrealDB with the --deny-scripting flag or by setting SURREAL_CAPS_DENY_SCRIPT=true; this workaround fully eliminates the attack surface but disables all embedded JavaScript function execution, which will break any SurrealQL queries that rely on scripting. The vendor advisory is at https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3824-qmfq-2qv7 and SurrealDB capability documentation is at https://surrealdb.com/docs/surrealdb/security/capabilities.

Affected VersionsENISA

surrealdb 0 <2.2.2
surrealdb 0 <2.1.5
surrealdb 0 <2.0.5

Affected Packages

cargo surrealdb fix: 2.0.5, 2.1.5, 2.2.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in cargo

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SurrealDB (cpe:2.3:a:surrealdb:surrealdb) is a Rust-based multi-model database that supports embedded JavaScript scripting functions via SurrealQL for advanced query logic. The root cause is CWE-770 (Allocation of Resources Without Limits or Throttling): while JS function execution was bounded for memory and stack size, no wall-clock execution-time limit was enforced. A submitted JavaScript function could therefore run indefinitely, tying up server workers. The fix, implemented in PR #5597, introduces a default execution-time timeout for scripting functions, configurable via the SURREAL_SCRIPTING_MAX_TIME_LIMIT environment variable. The scripting subsystem is activated by the --allow-scripting or --allow-all flags, or equivalently by the SURREAL_CAPS_ALLOW_SCRIPT=true or SURREAL_CAPS_ALLOW_ALL=true environment variables.

Know when Surrealdb gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 2.3 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 3.1 LOW

Non-default scripting configuration is a meaningful prerequisite mapped to AC:H; PR:L for required authentication; availability impact is partial only with no C or I impact.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 18, 2026 - 15:17 EUVD

DescriptionCVE.org

SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 does not enforce a default execution-time limit on embedded JavaScript scripting functions when the scripting capability is explicitly enabled (via --allow-scripting or --allow-all). An authenticated attacker can submit long-running JavaScript functions to exhaust server resources and cause a denial of service. Scripting is disabled by default.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Low
emerging multi-model database, limited enterprise production footprint
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-71392 CRITICAL
9.4 Jul 18

Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica

CVE-2026-134292 CRITICAL
9.3 Nov 21

SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed

CVE-2026-63756 CRITICAL
9.2 Jul 20

Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act

CVE-2026-134299 HIGH
8.7 Nov 21

Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo

CVE-2026-134293 HIGH
8.8 Nov 21

SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow

CVE-2026-134295 HIGH
8.7 Nov 21

Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an

CVE-2026-134291 HIGH
8.7 Nov 21

Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read

CVE-2026-137490 HIGH
8.7 Nov 26

SurrealDB releases before 4.0.0 fail to check query capability inside the embedded JavaScript bridge, so a low-privilege

CVE-2026-134309 HIGH
8.7 Nov 21

SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete

CVE-2026-121417 HIGH
8.8 Nov 03

Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a

CVE-2026-134294 HIGH
8.7 Nov 21

Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0

CVE-2026-63760 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy