CVE-2026-145070: SurrealDB before 4.0.0 Authorization Bypass via DDL Namespace Recreation
SurrealDB before 4.0.0 lacks namespace-creation authorization checks in DDL statements such as DEFINE FUNCTION, DEFINE PARAM, and DEFINE USER ON NS. Database- or namespace-level Editors holding a WebSocket or embedded SDK session authenticated before a root administrator dropped their namespace can execute DDL to silently recreate that namespace, empty, without root privileges.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue?
A database- or namespace-level Editor can exploit it if they have a WebSocket or embedded SDK session that was authenticated before a root administrator dropped the namespace. Root privileges are not required.
What access or conditions are required for exploitation?
The attacker needs an existing authenticated WebSocket or embedded SDK session and Editor-level access at the database or namespace scope. A root administrator must have dropped the namespace after that session was authenticated.
Are all SurrealDB deployments affected by default?
The issue affects SurrealDB versions before 4.0.0 only where the described conditions exist: an Editor-level session remains authenticated when its namespace is dropped. The provided information does not establish that every default deployment exposes such a session.
What is the impact of a successful exploit?
The Editor can use affected DDL statements, including DEFINE FUNCTION, DEFINE PARAM, and DEFINE USER ON NS, to silently recreate the dropped namespace as an empty namespace. This can affect integrity and availability.
How can teams determine whether they may have been affected?
Review whether namespaces were dropped while database- or namespace-level Editor WebSocket or embedded SDK sessions remained authenticated, then check for namespaces recreated through DDL activity such as DEFINE FUNCTION, DEFINE PARAM, or DEFINE USER ON NS. The provided information does not identify a more specific detection method.