GHSA-6r8p-hpg7-825g: Uncontrolled Recursion in SurrealQL Parsing
In some specific instances, the SurrealQL parser will attempt to recursively parse nested statements or idioms (i.e. nested IF and RELATE statements, nested basic idioms and nested access to attributes) without checking if the depth limit established by default or in the SURREALMAXCOMPUTATIONDEPTH environment variable is exceeded.
Published Jan 18, 2024
Affected packages
surrealdb
- Ecosystem
- Rust (crates.io)
- Affected
- < 1.1.0
- Fixed in
- 1.1.0
- Check
cargo tree -i surrealdb
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
In some specific instances, the SurrealQL parser will attempt to recursively parse nested statements or idioms (i.e. nested IF and RELATE statements, nested basic idioms and nested access to attributes) without checking if the depth limit established by default or in the SURREAL_MAX_COMPUTATION_DEPTH environment variable is exceeded. This can lead to the stack overflowing when the nesting surpasses certain levels of depth.
Impact
An attacker that is authorized to run queries on a SurrealDB server may be able to run a query using the affected statements and idioms with very deep nesting in order to crash the server, leading to denial of service.
Patches
- Version 1.1.0 and later are not affected by this issue.
Workarounds
Concerned users unable to update may want to limit the ability of untrusted users to run arbitrary SurrealQL queries in the affected versions of SurrealDB. To limit the impact of the denial of service, SurrealDB administrators may also want to ensure that the SurrealDB process is running so that it can be automatically re-started after a crash.
References
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62410
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62652
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63797
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64445
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64731
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65277
References
- https://github.com/surrealdb/surrealdb/security/advisories/GHSA-6r8p-hpg7-825g
- https://github.com/surrealdb/surrealdb/pull/3232
- https://github.com/surrealdb/surrealdb/commit/f838da248e3854e4250e5187a3a67507cb7efaaa
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62410
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62652
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63797
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64445
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64731
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65277
- https://github.com/advisories/GHSA-6r8p-hpg7-825g
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
