Read the docs
TI-2026-66221 Aliases GHSA-xx7m-69ff-9crp

SurrealDB vulnerable to Denial of Service through scripting function memory edge case

Priority LOW 38CWE-476Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Denial of service
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-476.

Summary

In SurrealDB instances with the scripting capability enabled (`--allow-scripting`), users with the ability to run arbitrary queries can trigger a server crash due to a memory-safety bug in the underlying JS engine. The SurrealDB instance terminates instantly, requiring a manual restart. The query consists of using built-in string functions to construct a large string and passing it to the JavaScript runtime for compilation. The exact string size required to trigger the crash varies between SurrealDB versions. Whilst exploiting the vulnerability requires users to be able to run arbitrary queries, if guest access (`--allow-guests`), is enabled, then guests can perform this attack. ### Impact Any user able to execute queries on a SurrealDB instance with scripting enabled (`--allow-scripting`) can cause complete denial of service. The server process terminates immediately without graceful shutdown. The underlying cause of the vulnerability is a null pointer dereference in the `QuickJS-NG` v0.8 JavaScript engine, this vulnerability cannot be exploited to execute arbitrary code, or compromise the integrity or confidentiality of data. ### Patches Versions prior to SurrealDB `v2.6.1` and `v3.0.0-beta.3` are vulnerable. The patches for SurrealDB `v2.6.1` and `v3.0.0-beta.3` update the `rquickjs` dependency from `v0.9.0` to `v0.11.0`, which in turn uses an updated version of `QuickJS-NG`. ### Workarounds Deny execution of embedded scripting functions through the configuration of [capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities#capabilities) by starting SurrealDB with the `--deny-scripting` flag or the equivalent environment variable `SURREAL_CAPS_DENY_SCRIPT=true`. This has a usability implication, although scripting functions are disabled by default. Administrators can also use `--deny-arbitrary-query` to deny arbitrary querying by either `guest`, `record` or `system` users, or a combination of those, with impacts to functionality for those users. ### Links ### [SurrealDB Documentation - Capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities) [SurrealDB Documentation - Guest Access](https://surrealdb.com/docs/surrealdb/security/capabilities#guest-access) [SurrealQL Documentation - Scripting Functions](https://surrealdb.com/docs/surrealql/functions/script) [quickjs-ng v0.9 Release Notes](https://github.com/quickjs-ng/quickjs/releases/tag/v0.9.0) https://github.com/surrealdb/surrealdb/pull/6833 https://github.com/surrealdb/surrealdb/pull/6774

Why it matters now

Fix Fixed surrealdb (crates.io): 2.6.1, 3.0.0-beta.3

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—surrealdb (crates.io)before 2.6.12.6.1Patch availableGHSA-xx7m-69ff-9crp
—surrealdb (crates.io)3.0.0-alpha.8 to before 3.0.0-beta.33.0.0-beta.3Patch availableGHSA-xx7m-69ff-9crp
  • surrealdb (crates.io) Vendor— Affected before 2.6.1 Fixed in 2.6.1 Patch available GHSA-xx7m-69ff-9crp
  • surrealdb (crates.io) Vendor— Affected 3.0.0-alpha.8 to before 3.0.0-beta.3 Fixed in 3.0.0-beta.3 Patch available GHSA-xx7m-69ff-9crp

Remediation

  • Fix · GHSA-xx7m-69ff-9crp surrealdb (crates.io) Fixed in 2.6.1 Advisory →
  • Fix · GHSA-xx7m-69ff-9crp surrealdb (crates.io) Fixed in 3.0.0-beta.3 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-xx7m-69ff-9crp

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences