Duplicate Advisory: SurrealDB no JavaScript script function default timeout could facilitate DoS
Description
SurrealDB versions before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 do not enforce a default execution-time limit on embedded JavaScript functions when scripting is enabled. This allows an authenticated attacker to submit long-running JavaScript code that can exhaust server resources and cause a denial of service. Scripting is disabled by default, reducing exposure unless explicitly enabled.
CVSS v3.1
Score 6.5medium
Affected software
pkg:github/surrealdb/surrealdbRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in SurrealDB (CVE-2025-71396) affects versions prior to 2.0.5, 2.1.0 up to but not including 2.1.5, and 2.2.0 up to but not including 2.2.2. When the scripting feature is enabled via the --allow-scripting or --allow-all flags, there is no enforced default timeout on JavaScript script execution. An authenticated attacker can exploit this by submitting long-running JavaScript functions, leading to resource exhaustion and denial of service. The scripting capability is disabled by default, which limits the attack surface unless explicitly enabled by the administrator.
Potential Impact
An authenticated attacker can cause a denial of service by submitting long-running JavaScript functions that exhaust server resources. There is no impact on confidentiality or integrity according to the CVSS vector. The vulnerability affects availability only.
Mitigation Recommendations
Upgrade SurrealDB to versions 2.0.5 or later, 2.1.5 or later, or 2.2.2 or later where this issue is fixed. If upgrading is not immediately possible, ensure that scripting is not enabled unless necessary, as it is disabled by default. No official patch links were provided in the advisory, but the version constraints indicate fixed versions. Patch status is confirmed by version numbers.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6g9r-xqrf-34xh
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-71396"]
- Database Specific Severity
- LOW
- Cvss Version
- 4.0
Threat ID: 6a5ba17e44ab8fbf7c789bae
Added to database: 07/18/2026, 15:53:34 UTC
Last enriched: 09/15/2026, 07:52:19 UTC
Last updated: 10/17/2026, 18:48:16 UTC
Views: 168
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.