{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.1.0"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "DESCRIPTION"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3fe28f57517a5d3255cdbb479c815d8021abf92a"
            }
          ],
          "repo": "https://github.com/surrealdb/surrealdb",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-m52v-24p8-654f"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-248"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58359.json"
  },
  "details": "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.",
  "id": "CVE-2024-58359",
  "modified": "2026-07-21T03:41:54.504138516Z",
  "published": "2026-07-18T13:10:02.920Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58359.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-m52v-24p8-654f"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58359"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/surrealdb-before-denial-of-service-via-rand-sorting"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "SurrealDB before 2.1.0 Denial of Service via rand() Sorting"
}