Vulnerability DatabaseGHSA-m52v-24p8-654f

GHSA-m52v-24p8-654f
Rust vulnerability analysis and mitigation

Overview

A vulnerability in SurrealDB versions prior to 2.1.0 was discovered where sorting table records using an ORDER BY clause with the rand() function could cause a server panic. The issue (GHSA-m52v-24p8-654f) was caused by a comparison function that did not implement total order, which became problematic after a recent change in Rust 1.81. The vulnerability was discovered in October 2024 and patched in version 2.1.0 (GitHub Advisory).

Technical details

The vulnerability stemmed from an invalid shuffling implementation where the sorting mechanism attempted to generate random numbers during each comparison and then compare those numbers. This approach failed to guarantee a total ordering, which could lead to infinite sorting attempts and ultimately cause the server to panic. The issue was particularly triggered when executing queries using 'ORDER BY rand()' clause (SurrealDB PR 4989). The vulnerability has been assigned a CVSS v3.1 score of 6.5 (Moderate) with vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (GitHub Advisory).

Impact

The vulnerability could allow an authenticated client to cause a denial of service by executing a query with ORDER BY rand(), resulting in a server crash. While the impact was limited to availability with no effect on confidentiality or integrity, it could disrupt service operations by forcing the server to restart (GitHub Advisory).

Mitigation and workarounds

The issue has been fixed in SurrealDB version 2.1.0 by updating the sorting algorithm to guarantee total order when shuffling records. For users unable to update, recommended workarounds include limiting the ability of untrusted clients to run arbitrary SurrealQL queries and ensuring the SurrealDB process is configured to automatically restart after a crash (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22257HIGH8.8
  • RustRust
  • salvo
NoYesJan 08, 2026
CVE-2026-22698HIGH8.7
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22699HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
GHSA-g59m-gf8j-gjf5LOW3.7
  • RustRust
  • aws-sdk-eventbridge
NoYesJan 08, 2026
GHSA-585q-cm62-757jLOW2
  • RustRust
  • mnl
NoNoJan 09, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management