---
id: CVE-2025-71396
title: >-
  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 -…
summary: >-
  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 -…
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-770
vendor: surrealdb
product: surrealdb
affected:
  - surrealdb < 2.0.5
  - 'surrealdb >= 2.1.0, < 2.1.5'
  - 'surrealdb >= 2.2.0, < 2.2.2'
patched:
  - surrealdb 2.2.2
published: '2026-07-18'
updated: '2026-09-29'
sourceUpdated: '2026-09-29T19:10:00.160'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-71396'
references:
  - url: >-
      https://github.com/surrealdb/surrealdb/security/advisories/GHSA-3824-qmfq-2qv7
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/surrealdb-before-denial-of-service-via-javascript-scripting
    label: disclosure@vulncheck.com
tags:
  - nvd
  - cve.org
  - score-dispute
epss: 0.00551
epssPercentile: 0.46173
ingestedAt: '2026-07-19T05:29:21.279Z'
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-07-20T13:38:19.088019Z'
scores:
  nvd: 6.5
  cna: 2.3
---

## Overview

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.

## Affected

- `surrealdb < 2.0.5`
- `surrealdb >= 2.1.0, < 2.1.5`
- `surrealdb >= 2.2.0, < 2.2.2`

## Remediation

Upgrade past the affected range:

- `surrealdb 2.2.2`
