Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/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 query interface (AV:N/AC:L) requiring any authenticated principal (PR:L) yields full table disclosure (C:H) with no integrity or availability impact and no scope change.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
4DescriptionCVE.org
SurrealDB before 3.1.0 evaluates user-supplied WHERE clauses in SELECT statements (and SET/MERGE/CONTENT/PATCH clauses in UPDATE, UPSERT, INSERT ON DUPLICATE KEY UPDATE, and RELATE update-variant statements) against full record data before enforcing PERMISSIONS FOR SELECT WHERE restrictions. An authenticated user - including Record and Scope users - can exploit this ordering flaw to read the full contents of any table in the database they are authenticated against, bypassing table-level permission checks. Exfiltration is most direct when scripting functions are enabled (--allow-scripting), but is also possible via SurrealQL's THROW statement and timing-based side channels without scripting. The vulnerability is confined to the attacker's current database and does not cross namespace or database isolation boundaries.
AnalysisAI
Broken authorization in SurrealDB before 3.1.0 lets any authenticated principal - including low-privilege Record and Scope users - read the full contents of every table in their current database, bypassing PERMISSIONS FOR SELECT WHERE controls. The flaw stems from the engine evaluating user-supplied WHERE (and SET/MERGE/CONTENT/PATCH) expressions against complete record data before running the table-level SELECT permission check, so side-effecting expressions exfiltrate data the caller should never see. No public exploit identified at time of analysis, and the issue is not in CISA KEV, but the GHSA advisory documents multiple practical exfiltration primitives (scripting functions, THROW, and timing side channels).
Technical ContextAI
SurrealDB is an emerging multi-model database that exposes SurrealQL, a SQL-like query language supporting row-level access control via PERMISSIONS FOR SELECT WHERE clauses attached to tables. The vulnerability is a CWE-863 (Incorrect Authorization) ordering defect: the query executor binds and evaluates the caller's WHERE predicate against the full, unredacted record before the permission gate (check_permissions_table) decides whether the caller may see that record. Because SurrealQL expressions can produce observable side effects, the predicate itself becomes an oracle over data the permission layer was supposed to hide. The same premature-evaluation path affects the mutation clauses (SET, MERGE, CONTENT, PATCH) of UPDATE, UPSERT update-variant, INSERT ON DUPLICATE KEY UPDATE, and RELATE update-variant statements. The fix centralizes the check via a new check_pre_update helper that enforces check_permissions_table before any user expression runs.
RemediationAI
Upgrade to SurrealDB 3.1.0 or later, which reorders enforcement so check_permissions_table runs before any user-supplied expression is evaluated (fix commit 500f4060349580b9cbb9c07b8112a487551c4616; advisory GHSA-98fx-66cf-fc7c). Vendor-released patch: 3.1.0. If you cannot upgrade immediately, remove the -A / --allow-scripting flag to block the most direct exfiltration path - but note this is only partial mitigation because THROW-based and timing side-channel extraction still work. Additionally, restrict which untrusted principals can run arbitrary SELECT statements with attacker-controlled WHERE clauses, and treat namespace/database isolation (not table-level PERMISSIONS) as the primary trust boundary between untrusted tenants, accepting the operational overhead of provisioning separate databases per tenant.
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-863 – Incorrect Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-45926
GHSA-4f9v-jpx9-mjvw