SurrealDB versions before 2.1.0 contain a denial of service vulnerability in the sorting mechanism when using ORDER BY rand() clause. (CVE-2024-58359)
SurrealDB versions before 2.1.0 contain a denial of service vulnerability in the sorting mechanism when using ORDER BY rand() clause. Authorized clients can execute queries with ORDER BY rand() to trigger a panic in the sorting function, crashing the server.
AI Analysis
Technical Summary
CVE-2024-58359 describes a denial of service vulnerability in SurrealDB prior to version 2.1.0. The issue occurs when authorized clients run queries using ORDER BY rand(), which causes a panic in the sorting function and crashes the database server. This vulnerability is categorized under CWE-248 (Uncaught Exception).
Potential Impact
An attacker with authorized access can cause the SurrealDB server to crash by executing queries with ORDER BY rand(), resulting in denial of service. This disrupts availability of the database service.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict or monitor use of ORDER BY rand() queries by authorized clients to reduce risk.
SurrealDB versions before 2.1.0 contain a denial of service vulnerability in the sorting mechanism when using ORDER BY rand() clause. (CVE-2024-58359)
Description
SurrealDB versions before 2.1.0 contain a denial of service vulnerability in the sorting mechanism when using ORDER BY rand() clause. Authorized clients can execute queries with ORDER BY rand() to trigger a panic in the sorting function, crashing the server.
CVSS v4.0
Affected software
pkg:github/surrealdb/surrealdbRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-58359 describes a denial of service vulnerability in SurrealDB prior to version 2.1.0. The issue occurs when authorized clients run queries using ORDER BY rand(), which causes a panic in the sorting function and crashes the database server. This vulnerability is categorized under CWE-248 (Uncaught Exception).
Potential Impact
An attacker with authorized access can cause the SurrealDB server to crash by executing queries with ORDER BY rand(), resulting in denial of service. This disrupts availability of the database service.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict or monitor use of ORDER BY rand() queries by authorized clients to reduce risk.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-gjm5-72ch-9675
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2024-58359"]
- Ecosystems
- []
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a5ba17f44ab8fbf7c789e8c
Added to database: 07/18/2026, 15:53:35 UTC
Last enriched: 07/18/2026, 16:23:47 UTC
Last updated: 07/18/2026, 20:18:56 UTC
Views: 11
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.