CVE-2024-58370
JSON

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 packageVersionsReported by
surrealdb surrealdbbefore 1.1.0
Not affected: 1.1.0
CVE List, NVD
surrealdb (crates.io)before 1.1.0GitHub Advisory Database

All scores

VulnCheck7.1high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
VulnCheck6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-674

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
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

SourceRecordLicence
CVE ListCVE-2024-58370 changed 2026-07-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-6r8p-hpg7-825g changed 2026-07-19CC-BY-4.0
NVDCVE-2024-58370 changed 2026-10-27Public domain