{"id":"GHSA-wjjj-24cx-f28g","revision":"1521f21e296d4a47b9f49de8cef2bc91","records":[{"revision":"1521f21e296d4a47b9f49de8cef2bc91","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-wjjj-24cx-f28g","aliases":[],"title":"SurrealDB has unauthenticated remote DoS via malformed RPC `use` call","description":"A single unauthenticated WebSocket message to `/rpc` crashed the SurrealDB server. Sending `use { db: \"x\" }` without first selecting a namespace hit `.expect(\"namespace should be set\")` in the `use` handler; because `surrealdb-core` is built with `panic = 'abort'`, the panic terminated the process. `use` is callable before `signin`, and the per-method capability check passes by default for guest callers — so no credentials, token, or `--allow-guests` flag are required.\n\n### Impact\n\nAn unauthenticated remote attacker who could reach the `/rpc` endpoint could crash the SurrealDB server with a single WebSocket message. No credentials, token, session knowledge, or capability are required.\n\n### Patches\n\nA patch has been introduced that returns a typed `invalid_params` response when `db` is set on a session with no `ns`, replacing the panic.\n\n- Versions 3.1.0 and later are not affected by this issue.\n\n### Workarounds\n\nAffected users who are unable to update should restrict network access to the `/rpc` endpoint to trusted clients, and run SurrealDB under a process supervisor that restarts on crash.","state":0,"publishedAt":"2026-07-01T20:04:22+00:00","modifiedAt":"2026-07-01T20:15:09.9389751+00:00","affected":[{"ecosystem":"crates.io","name":"surrealdb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/surrealdb/surrealdb/security/advisories/GHSA-wjjj-24cx-f28g","https://github.com/surrealdb/surrealdb/commit/1537ec4fbd789c61a5b43b648a854577dbe31a34","https://github.com/surrealdb/surrealdb"],"sourceUrl":"https://github.com/advisories/GHSA-wjjj-24cx-f28g","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-wjjj-24cx-f28g","identifiers":["GHSA-wjjj-24cx-f28g"]},"retained":false,"historicalAffected":[]}],"coverage":[]}