7.1high
SurrealDB before 2.0.4 Denial of Service via Parser Exception
- Severity
- 7.1high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.25% (higher than 18% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-qjrv-v6qp-x99x
Description
SurrealDB versions before 2.0.4 contain an uncaught exception handling vulnerability in the parser error rendering code when processing empty strings. Authorized clients can execute malformed queries with empty string conversions to record, duration, or datetime types that cause a panic in error rendering, crashing the server.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| surrealdb surrealdb | from 2.0.0 before 2.0.4 Not affected: 2.0.4 | CVE List, NVD |
| surrealdb (crates.io) | from 2.0.0 before 2.0.4 | GitHub Advisory Database |
| surrealdb-core (crates.io) | from 2.0.0 before 2.0.4 | 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.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
SurrealDB versions before 2.0.4 contain an uncaught exception handling vulnerability in the parser error rendering code when processing empty strings. Authorized clients can execute malformed queries with empty string conversions to record, duration, or datetime types that cause a panic in error rendering, crashing the server.
GitHub Advisory Database
The error rendering code from the parser would panic when handling failed parsing of queries where the error occurred when converting an empty string to a SurrealDB value. This would be the case when casting an empty string to a record, duration or datetime, as well as potentially when parsing an empty string to JSON or providing an empty string to the type::field and type::fields functions.
Impact
A client that is authorized to run queries in a SurrealDB server would be able to execute a malformed query which would fail to parse when converting an empty string and cause a panic in the error rendering code. This would crash the server, leading to denial of service.
Patches
- Version 2.0.4 and later are not affected by this issue.
Workarounds
Affected users who are unable to update may want to limit the ability of untrusted clients 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.
NVD (es)
Las versiones de SurrealDB anteriores a la 2.0.4 contienen una vulnerabilidad de manejo de excepciones no capturadas en el código de renderizado de errores del analizador al procesar cadenas vacías. Clientes autorizados pueden ejecutar consultas malformadas con conversiones de cadenas vacías a tipos de registro, duración o fecha y hora que causan un pánico en el renderizado de errores, provocando la caída del servidor.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-58361 changed 2026-07-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qjrv-v6qp-x99x changed 2026-07-19 | CC-BY-4.0 |
| NVD | CVE-2024-58361 changed 2026-10-27 | Public domain |