Vulnerability DatabaseGHSA-h4f5-h82v-5w4r

GHSA-h4f5-h82v-5w4r
Rust vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-h4f5-h82v-5w4r) affects the rand::time() function in SurrealQL, which was discovered and disclosed on November 22, 2024. This moderate severity issue impacts SurrealDB versions prior to 2.1.0, specifically affecting both the surrealdb and surrealdb-core Rust packages. The vulnerability stems from the function's handling of random time generation from Unix timestamps, where the underlying use of timestamp_opt from the chrono crate could return None, leading to a panic when unwrap was called on its result (GitHub Advisory).

Technical details

The vulnerability has been assigned a CVSS v3.1 score of 6.5 (Moderate), with the following characteristics: Network attack vector, Low attack complexity, Low privileges required, No user interaction needed, Unchanged scope, No impact on confidentiality and integrity, but High impact on availability. The issue is classified under CWE-248 and occurs when the rand::time() function processes Unix timestamps using the chrono crate's timestamp_opt functionality (GitHub Advisory).

Impact

The vulnerability's primary impact is a potential denial of service condition. When exploited, an authorized client can trigger a server crash by making repeated calls (in the order of millions) to the rand::time() function, effectively disrupting the service availability (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 2.1.0, where the function has been updated to guarantee that a datetime is returned or an error is gracefully handled. For users unable to update, recommended workarounds include limiting untrusted clients' ability to run the rand::time() function using security capabilities and ensuring the SurrealDB process is configured for automatic restart after crashes (GitHub Advisory, Pull Request).

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-22698HIGH8.7
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22700HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22699HIGH7.5
  • RustRust
  • sm2
NoNoJan 10, 2026
CVE-2026-22705MEDIUM6.4
  • RustRust
  • ml-dsa
NoYesJan 10, 2026
CVE-2025-15504MEDIUM4.8
  • PythonPython
  • lief
NoYesJan 10, 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