GHSA-xx7m-69ff-9crp: SurrealDB vulnerable to Denial of Service through scripting function memory edge case
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.
Published Feb 12, 2026
Affected packages
surrealdb
- Ecosystem
- Rust (crates.io)
- Affected
- < 2.6.1
- Fixed in
- 2.6.1
- Check
cargo tree -i surrealdb
surrealdb
- Ecosystem
- Rust (crates.io)
- Affected
- >= 3.0.0-alpha.8, < 3.0.0-beta.3
- Fixed in
- 3.0.0-beta.3
- Check
cargo tree -i surrealdb
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 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 SurrealDB Documentation - Guest Access SurrealQL Documentation - Scripting Functions quickjs-ng v0.9 Release Notes https://github.com/surrealdb/surrealdb/pull/6833 https://github.com/surrealdb/surrealdb/pull/6774
Credited to LucyEgan.
References
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-xx7m-69ff-9crp
- https://github.com/surrealdb/surrealdb/pull/6774
- https://github.com/surrealdb/surrealdb/pull/6833
- https://github.com/surrealdb/surrealdb/commit/2b0389b92398d9ecff4632cd51bbf8303832a988
- https://github.com/surrealdb/surrealdb/commit/bcd2ece9ef0d721215f06a47280698669f332285
- https://github.com/advisories/GHSA-xx7m-69ff-9crp
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesCVE-2026-63735
SurrealDB: Custom API route lets authenticated callers override namespace/database scope via URL path
high8.1Sep 4, 2026CVE-2026-63740
SurrealDB: Array element-level (field.*) SELECT permissions leak denied elements to record users
medium6.5Aug 14, 2026CVE-2026-49997
SurrealDB: Edge PERMISSIONS FOR delete bypassed when a connected node is deleted
medium5.4Jul 1, 2026CVE-2026-63743
SurrealDB: Port-specific --deny-net rules silently bypassed on HTTP redirect
medium6.4Jul 1, 2026CVE-2026-63746
SurrealDB: Graph traversal bypasses table SELECT permissions
medium6.5Jul 1, 2026CVE-2026-63748
SurrealDB: Authenticated callers can read fields hidden by field-level SELECT permissions via error messages
medium4.3Jul 1, 2026
