Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege Record/Scope user
-
DeliveryCraft SELECT with side-effecting WHERE clause
-
ExploitEngine evaluates expression before permission check
-
ExecutionExfiltrate via scripting/THROW/timing channel
-
ImpactRead protected table contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must hold valid authentication to the target database at any privilege level (CVSS PR:L), including the lowest-trust Record or Scope users, and must be able to submit SELECT or update-variant (UPDATE/UPSERT/INSERT ON DUPLICATE KEY UPDATE/RELATE) statements with an attacker-controlled WHERE, SET, MERGE, CONTENT, or PATCH clause. Direct, high-bandwidth exfiltration additionally requires the server to be started with --allow-scripting / -A; without it, exploitation still works but is limited to lower-bandwidth THROW-based error leakage and timing side channels. Limiting factors: exploitation cannot cross the current database boundary - tables in other databases or namespaces are unreachable - and it requires the ability to run arbitrary queries, so deployments that proxy or template all queries and forbid user-supplied clauses substantially raise the bar. |
| Impact | The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H) scores 7.1 and is internally consistent with the description: network-reachable, low complexity, requires low-privilege authentication (PR:L), and yields high confidentiality impact with no integrity or availability impact - matching a read-only permission-bypass that discloses arbitrary table data. There is no EPSS score, KEV entry, or public POC in the provided data, so this is a real but not yet mass-exploited priority: exploitation requires valid credentials on the target database, which caps opportunistic internet-wide abuse but makes it highly relevant for any multi-tenant deployment relying on table-level permissions to separate low-trust Record/Scope users. Signals are consistent with no conflicts; the main uncertainty is real-world exploitation likelihood, which cannot be quantified without EPSS. The scripting-enabled (--allow-scripting) path is the most direct, but the vendor confirms THROW-based and timing-based extraction work even in hardened configurations, so disabling scripting alone does not neutralize the risk. |
| Exploit ScenarioDerived | A low-privilege Record or Scope user authenticated to a shared database submits a SELECT (or update-variant) statement whose WHERE clause embeds a side-effecting expression, causing the engine to leak record fields from a table they lack SELECT permission on. With --allow-scripting enabled they exfiltrate rows directly; otherwise they use THROW to surface data in error messages or measure query timing to reconstruct it row by row. No public POC is currently identified, but the advisory describes each primitive in enough detail to reproduce. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 20, 2026
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).
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Surrealdb gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
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
2DescriptionCVE.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.
Executive ViewAI
SurrealDB versions before 3.1.0 contain a broken authorization flaw that allows any database user to read the complete contents of all tables, entirely bypassing row-level access controls. Organizations relying on SurrealDB for multi-tenant or role-based data isolation face uncontrolled exposure of sensitive customer data and confidential business information across their entire database.
No vendor-released patch identified at time of analysis. Interim mitigations: enforce network segmentation to limit database access to trusted applications only, disable or deprivilege low-privilege user accounts, deploy database-layer monitoring to detect anomalous read query volumes, and consider temporary data segregation for the most sensitive tables until a patched version is available.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
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
SurrealDB versions before 3.3.0 fail to validate a caller's authorization level when the SurrealQL USE statement switche
Cross-tenant data access in SurrealDB before 3.3.0 allows an authenticated namespace- or database-level SYSTEM user to b
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 versions before 3.3.0 lets a query-capable authenticated user with embedded JavaScript sc
EUVD-2026-45926
GHSA-4f9v-jpx9-mjvw
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB