GHSA-M52V-24P8-654F

GHSA-M52V-24P8-654F is a medium-severity security vulnerability in surrealdb (rust), affecting versions < 2.1.0. It is fixed in 2.1.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

SurrealDB has an Uncaught Exception Sorting Tables by Random Order

Sorting table records using an ORDER BY clause with the rand() function as sorting mechanism could cause a panic due to relying on a comparison function that did not implement total order. This event resulted in a panic due to a recent change in Rust 1.81.

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.

References

Impact

A client that is authorized to run queries in a SurrealDB server would be able to query a table with ORDER BY rand() in order to potentially cause a panic in the sorting function. This would crash the server, leading to denial of service.

GHSA-M52V-24P8-654F has a CVSS score of 6.5 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.1.0); upgrading removes the vulnerable code path.

Affected versions

surrealdb (< 2.1.0) surrealdb-core (< 2.1.0)

Security releases

surrealdb → 2.1.0 (rust) surrealdb-core → 2.1.0 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The sorting algorithm has been updated to guarantee total order when shuffling records.

  • Version 2.1.0 and later are not affected by this issue.

Frequently Asked Questions

  1. What is GHSA-M52V-24P8-654F? GHSA-M52V-24P8-654F is a medium-severity security vulnerability in surrealdb (rust), affecting versions < 2.1.0. It is fixed in 2.1.0.
  2. How severe is GHSA-M52V-24P8-654F? GHSA-M52V-24P8-654F has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by GHSA-M52V-24P8-654F?
    • surrealdb (rust) (versions < 2.1.0)
    • surrealdb-core (rust) (versions < 2.1.0)
  4. Is there a fix for GHSA-M52V-24P8-654F? Yes. GHSA-M52V-24P8-654F is fixed in 2.1.0. Upgrade to this version or later.
  5. Is GHSA-M52V-24P8-654F exploitable, and should I be worried? Whether GHSA-M52V-24P8-654F is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-M52V-24P8-654F is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-M52V-24P8-654F?
    • Upgrade surrealdb to 2.1.0 or later
    • Upgrade surrealdb-core to 2.1.0 or later

Other vulnerabilities in surrealdb

Stop the waste.
Protect your environment with Kodem.