7.1high
SurrealDB before 1.1.0 Uncontrolled Recursion Denial of Service
- Severity
- 7.1high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.28% (higher than 22% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-6r8p-hpg7-825g
Description
SurrealDB versions before 1.1.0 fail to enforce recursion depth limits when parsing nested SurrealQL statements including IF, RELATE, and attribute access idioms. Authorized attackers can submit queries with excessive nesting depth to cause stack overflow and crash the server.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| surrealdb surrealdb | before 1.1.0 Not affected: 1.1.0 | CVE List, NVD |
| surrealdb (crates.io) | before 1.1.0 | GitHub Advisory Database |
All scores
| VulnCheck | 7.1high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
SurrealDB versions before 1.1.0 fail to enforce recursion depth limits when parsing nested SurrealQL statements including IF, RELATE, and attribute access idioms. Authorized attackers can submit queries with excessive nesting depth to cause stack overflow and crash the server.
GitHub Advisory Database
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
NVD (es)
Las versiones de SurrealDB anteriores a la 1.1.0 no logran aplicar límites de profundidad de recursión al analizar sentencias SurrealQL anidadas, incluyendo IF, RELATE y construcciones de acceso a atributos. Atacantes autorizados pueden enviar consultas con una profundidad de anidamiento excesiva para causar desbordamiento de pila y colapsar el servidor.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-58370 changed 2026-07-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6r8p-hpg7-825g changed 2026-07-19 | CC-BY-4.0 |
| NVD | CVE-2024-58370 changed 2026-10-27 | Public domain |