{"id":"CVE-2024-58363","summary":"SurrealDB before 1.5.4 Authentication Bypass via Database Switch","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.","aliases":["GHSA-gh9f-6xm2-c4j2"],"modified":"2026-07-23T03:56:20.822202041Z","published":"2026-07-18T13:10:04.938Z","database_specific":{"cwe_ids":["CWE-287"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58363.json","cna_assigner":"VulnCheck"},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/surrealdb/surrealdb","events":[{"introduced":"0"},{"fixed":"c9861d8aa9390397c62e325ecc00e66e6358acda"},{"fixed":"29b0df60602c09d240beb84f5bf80b05eab6cbd9"},{"fixed":"3c9efe329a57668ab5078167cc3df9f49cf45a17"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"1.5.4"},{"fixed":"2.0.0-alpha.6"},{"fixed":"1.5.1"}],"source":"AFFECTED_FIELD"}}],"versions":["v2.0.0-alpha.5","v2.0.0-alpha.4","v1.5.3","v2.0.0-alpha.3","v2.0.0-alpha.2","v2.0.0-alpha.1","v1.5.0","v1.5.0-beta.1","v1.0.0","v1.0.0-beta.12","v1.0.0-beta.11","v1.0.0-beta.10","v1.0.0-beta.9+20230402","v1.0.0-beta.9","v1.0.0-beta.8","v1.0.0-beta.7","v1.0.0-beta.6","v1.0.0-beta.5","v1.0.0-beta.4","v1.0.0-beta.3","v1.0.0-beta.2","v1.0.0-beta.1","v0.3.0","v0.1.30","v0.1.29","v0.1.28","v0.1.27","v0.1.26","v0.1.25","v0.1.24","v0.1.23","v0.1.22","v0.1.21","v0.1.20","v0.1.19","v0.1.18","v0.1.17","v0.1.16","v0.1.15","v0.1.14","v0.1.13","v0.1.12","v0.1.11","v0.1.10","v0.1.9","v0.1.8","v0.1.7","v0.1.6","v0.1.5","v0.1.4","v0.1.3","v0.1.2","v0.1.1","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-58363.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","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"}]}