Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable unauthenticated path (AV:N, PR:N); scope unchanged as impact is catalog-only; I:L and A:L for unauthorized creation and storage exhaustion; C:N confirmed by advisory.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
3DescriptionCVE.org
SurrealDB versions before 3.1.0 fail to validate DEFINE NAMESPACE or DEFINE DATABASE permissions when processing USE NS and USE DB statements. Unauthenticated attackers can create arbitrary namespaces and databases by issuing USE commands, bypassing authorization checks in the RPC use method and SurrealQL executor.
AnalysisAI
Unauthenticated namespace and database creation in SurrealDB before 3.1.0 exposes any network-reachable instance to unauthorized catalog manipulation. The RPC use method and SurrealQL executor's USE NS/USE DB handling silently creates namespaces and databases that don't yet exist without verifying whether the caller holds DEFINE NAMESPACE or DEFINE DATABASE authority, making a completely unauthenticated guest session sufficient to pollute or exhaust the catalog. No public exploit code has been identified at time of analysis, and the CVSS 4.0 score of 6.9 reflects limited impact - data within existing namespaces cannot be read or modified - but the storage exhaustion vector and the ability to resurrect deliberately dropped namespaces via stale tokens represent meaningful operational risk for multi-tenant or publicly exposed deployments.
Technical ContextAI
SurrealDB is a multi-model database written in Rust, exposing both a WebSocket/HTTP RPC API and a SurrealQL query language. The vulnerability stems from CWE-862 (Missing Authorization): three independent code paths that handle USE NS <name> and USE DB <name> - the RPC use method, Datastore::process_use, and the SurrealQL executor - all implicitly create the named namespace or database when it does not exist, but none performed an authorization check prior to the fix. Under SurrealDB's default capabilities model, unauthenticated guest sessions are permitted to reach these paths. The CPE for the affected package is rust/surrealdb versions < 3.1.0. A secondary side-effect is that a dropped namespace can be silently recreated by any holder of a stale namespace-Editor token, undermining deliberate revocation by operators.
RemediationAI
The primary fix is upgrading SurrealDB to version 3.1.0 or later, where all three USE entry points (RPC use method, Datastore::process_use, and the SurrealQL executor) now gate catalog creation on DEFINE NAMESPACE or DEFINE DATABASE authority. The upstream commit is f3ee3bd55533c14f1fa3e69ce18fc8904c1ce3f9. Sessions that send use before signin continue to function correctly - only the catalog creation step is now gated, preserving SDK compatibility. If immediate upgrade is not possible, two workarounds are available: first, set --deny-arbitrary-query * for guest principals to eliminate the unauthenticated entry point entirely, though this may break workflows that rely on guest query access; second, run with --auth and require all callers to complete signin before issuing any use command, which removes the unauthenticated path at the cost of requiring authentication for all sessions. Additionally, namespace-level tokens should be revoked promptly when a namespace is dropped to close the stale-token namespace-resurrection side channel regardless of patch status. The vendor advisory is at https://github.com/surrealdb/surrealdb/security/advisories/GHSA-wp87-mgvq-5j93.
Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web
Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi
Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the
Cross-tenant authorization bypass in SurrealDB before 3.2.0 lets any authenticated user reach custom API endpoints belon
Arbitrary file read in SurrealDB before 3.1.5 lets an authenticated database user holding the EDITOR or OWNER role discl
Confused-deputy privilege escalation in SurrealDB before 2.5.0 and before 3.0.0-beta.3 lets a low-privileged user (e.g.
Denial of service in SurrealDB before 3.1.5 lets an authenticated user with query-execution privileges crash the entire
Denial of service in SurrealDB before 2.0.5, 2.1.x before 2.1.5, and 2.2.x before 2.2.2 lets an authenticated user with
Information disclosure in SurrealDB before 3.1.0 allows authenticated record or scope users to bypass table-level SELECT
Denial of service in SurrealDB before 2.2.2 allows any authenticated user to crash the database by submitting a crafted
Same weakness CWE-862 – Missing Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-45912
GHSA-8p7x-252x-x2h5