{"id":"CVE-2024-58370","aliases":["CVE-2024-58370","GHSA-6r8p-hpg7-825g"],"related":[],"kind":"vulnerability","state":"published","title":"SurrealDB before 1.1.0 Uncontrolled Recursion Denial of Service","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\n### Impact\n\nAn 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.\n\n### Patches\n\n- Version 1.1.0 and later are not affected by this issue.\n\n### Workarounds\n\nConcerned 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.\n\n### References\n\n- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62410\n- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62652\n- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63797\n- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64445\n- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64731\n- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65277","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-01-18T15:55:18.000Z","modified":"2026-10-27T18:10:00.130Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":7.1,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.1.0","status":"affected"},{"type":"semver","version":"1.1.0","status":"unaffected"}],"vendor":"surrealdb","product":"surrealdb","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.0"}],"ecosystem":"crates.io","package":"surrealdb","purl":"pkg:cargo/surrealdb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.1.0"}],"vendor":"surrealdb","product":"surrealdb","cpe":"cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/surrealdb/surrealdb/security/advisories/GHSA-6r8p-hpg7-825g","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/surrealdb-before-uncontrolled-recursion-denial-of-service","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/surrealdb/surrealdb/pull/3232","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/surrealdb/surrealdb/commit/f838da248e3854e4250e5187a3a67507cb7efaaa","tags":["web"],"sources":["ghsa"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62410","tags":["web"],"sources":["ghsa"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62652","tags":["web"],"sources":["ghsa"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63797","tags":["web"],"sources":["ghsa"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64445","tags":["web"],"sources":["ghsa"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64731","tags":["web"],"sources":["ghsa"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65277","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/surrealdb/surrealdb","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-22T18:55:25.400Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-58370","url":"https://www.cve.org/CVERecord?id=CVE-2024-58370","licence":"CVE Terms of Use","modified":"2026-07-28T01:47:55.449Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6r8p-hpg7-825g","url":"https://github.com/advisories/GHSA-6r8p-hpg7-825g","licence":"CC-BY-4.0","modified":"2026-07-19T03:56:47.286Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-58370","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-58370","licence":"Public domain","modified":"2026-10-27T18:10:00.130Z"}],"updatedAt":"2026-11-25T22:58:53.052Z","epss":{"score":0.00281,"percentile":0.22101,"date":"2026-12-01T12:00:22.000Z"}}