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.
Published: 2026-07-18
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

History

Tue, 28 Jul 2026 02:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:surrealdb:surrealdb:*:*:*:*:*:*:*:*

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Surrealdb
Surrealdb surrealdb
Vendors & Products Surrealdb
Surrealdb surrealdb

Mon, 20 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Sat, 18 Jul 2026 13:45:00 +0000

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


Subscriptions

Surrealdb Surrealdb
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-28T01:47:48.525Z

Reserved: 2026-06-08T15:20:35.497Z

Link: CVE-2024-58359

cve-icon Vulnrichment

Updated: 2026-07-20T15:14:11.690Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:15:06Z

Weaknesses