{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.5.4"
              },
              {
                "fixed": "2.0.0-alpha.6"
              },
              {
                "fixed": "1.5.1"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "c9861d8aa9390397c62e325ecc00e66e6358acda"
            },
            {
              "fixed": "29b0df60602c09d240beb84f5bf80b05eab6cbd9"
            },
            {
              "fixed": "3c9efe329a57668ab5078167cc3df9f49cf45a17"
            }
          ],
          "repo": "https://github.com/surrealdb/surrealdb",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-gh9f-6xm2-c4j2"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-287"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58363.json"
  },
  "details": "SurrealDB before 1.5.4 fails to properly validate authentication when a scope user switches databases using the USE clause or use method. Attackers with an authenticated session can impersonate an unrelated user in a different database if a user record with an identical identifier exists, allowing unauthorized actions if permissions rely solely on the $auth parameter.",
  "id": "CVE-2024-58363",
  "modified": "2026-07-23T03:56:20.822202041Z",
  "published": "2026-07-18T13:10:04.938Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58363.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-gh9f-6xm2-c4j2"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58363"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/surrealdb-before-authentication-bypass-via-database-switch"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "SurrealDB before 1.5.4 Authentication Bypass via Database Switch"
}