CVE-2024-58359

SurrealDB before 2.1.0 Denial of Service via rand() Sorting

Published Jul 18, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability lies in the sorting mechanism of SurrealDB when an ORDER BY rand() clause is used. It is caused by the weakness CWE-248, a use of uninitialized variable, that allows an authorized client to craft a query that triggers a panic in the sorting function, causing the server process to crash. This results in a denial of service that affects the availability of the database.

Affected Systems

This issue affects all versions of SurrealDB prior to 2.1.0. The vendor is SurrealDB, and any deployment using an earlier release is susceptible. Users with authorized access are required to issue the problematic ORDER BY rand() query.

Risk and Exploitability

The CVSS score of 7.1 indicates a high severity, while the EPSS score of less than 1% suggests low current exploitation probability. The vulnerability is not listed in the CISA KEV catalog. Attackers must possess authenticated access to issue the query, so the attack vector is internal or compromised client. Once triggered, the server process crashes, leading to a loss of availability until restarted. The exploit is straightforward: sending an ORDER BY rand() query; no complex preconditions are described.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SurrealDB to version 2.1.0 or later.
  • Restrict or remove ORDER BY rand() functionality for authenticated users to prevent triggering the crash.
  • Implement query filtering or rate limits to mitigate repeated exploit attempts.

Generated by OpenCVE AI on July 30, 2026 at 23:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Surrealdb
Surrealdb surrealdb
Vendors & Products Surrealdb
Surrealdb surrealdb
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title SurrealDB before 2.1.0 Denial of Service via rand() Sorting
Weaknesses CWE-248
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

cvssV4_0

{'score': 7.1, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 28, 2026, 1:47 AM
Reserved
Jun 8, 2026, 3:20 PM
Status
Analyzed
Published
Jul 18, 2026, 2:17 PM
Modified
Oct 27, 2026, 6:10 PM