Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege VIEWER with SurrealQL access
-
ExploitWrap operation in nested FOR loops binding $access/$token/$auth
-
ExecutionForged variables shadow protected session values in permission check
-
ImpactRead, modify, or delete records beyond authorized scope
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 | Requires (1) an authenticated account of any privilege level - demonstrated with a database-level VIEWER (PR:L), (2) the ability to submit arbitrary SurrealQL to the database, which commonly occurs in applications exposing database or record-user SDK access directly to clients, and (3) target table permission predicates that reference the protected variables $access, $auth, $token (or potentially $session) - the PoC table used 'WHERE $access = ... AND $token.like = false AND $auth = users:alice'. Exploitation is limited where permission expressions do not consult these variables, and anonymous/record-access sessions, closure arguments, non-memory storage engines, and versions other than 3.2.4 were not verified by the reporter. Direct assignment (LET $access = ...) is correctly rejected; only the FOR-loop (and possibly closure/function parameter) binding path is confirmed exploitable. |
| Impact | The CVSS 4.0 base score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) indicates a remotely reachable, low-complexity flaw requiring only low-privilege authentication (PR:L) with no user interaction, yielding high confidentiality, integrity, and availability impact on the vulnerable system - consistent with the advisory's demonstration that a database-level VIEWER can read, modify, and delete records. There is no CISA KEV listing and no EPSS score in the provided data, so active exploitation is not confirmed; however, a detailed proof-of-concept exists in the vendor GHSA advisory and was reproduced by the reporter (VulnCheck) against SurrealDB 3.2.4, so this is not merely theoretical. The vuln.today decision label is 'this_week' (prioritize, not an emergency). Real-world priority is conditional: it is a genuine high-impact bypass wherever an application exposes arbitrary SurrealQL (database or record-user SDK access) to clients AND table permission predicates reference $access, $auth, $token, or $session - in deployments that do not use these variables in permission expressions the practical exposure is lower. Two data conflicts to verify: the input lists CWE-863 while the GHSA advisory classifies it as CWE-284, and the description claims the range 1.0.0 before 4.0.0 while the advisory states only 3.2.4 was empirically tested. |
| Exploit ScenarioDerived | An application exposes SurrealQL or record-user SDK access directly to clients, and its table permissions trust $access, $auth, or $token. An attacker holding only a low-privilege (VIEWER) account wraps a DELETE/SELECT/UPDATE inside nested FOR loops that bind forged $access, $token, and $auth values, which shadow the authenticated session values so the permission predicate evaluates true and the operation succeeds beyond the attacker's authorization. A working PoC in the vendor GHSA advisory reproduces unauthorized deletion by a VIEWER against SurrealDB 3.2.4. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 21, 2026
SurrealDB 1.0.0 through 3.x lets an authenticated user with only the database-level VIEWER role read, modify, and delete records outside their authorized scope by naming a FOR loop variable $access, $auth, $token, or $session, which shadows the protected session values that table permission predicates evaluate against. Direct assignment to these protected names is correctly rejected, but the loop binding path inserts attacker-supplied values into a child evaluation context that is consulted before the authenticated parent context, so forged predicates such as $access = 'album_like_writer' or $auth = users:alice evaluate as true. The reporter published a proof-of-concept in GitHub advisory GHSA-ffvm-mqh3-7986, reproduced against SurrealDB 3.2.4, and the flaw is fixed in 4.0.0; exploitation requires the ability to submit arbitrary SurrealQL, which commonly arises in applications exposing database or record-user SDK access directly to clients.
RemediationAI
Vendor-released patch: upgrade to SurrealDB 4.0.0 or later, which refuses a protected name such as $access or $auth as a FOR-loop, closure, or function parameter so reserved parameters can no longer be shadowed (fix commit 0e7a509f5a); the crate is published as rust/surrealdb with the fix in 4.0.0. Until upgrading, the exposure reduces to environments that meet the advisory's stated prerequisites, so review every table PERMISSIONS predicate that references $access, $auth, $token, or $session and stop relying on those variables as trust anchors in predicates reachable by untrusted clients, and remove the ability for clients to submit arbitrary SurrealQL by fronting database and record-user SDK access with an application layer that issues only vetted queries - both measures require reworking existing permission definitions and client architecture and neither is described by the vendor as a complete substitute for updating. Direct assignment via LET to these names is already rejected, so it is not a workaround.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SurrealQL table PERMISSIONS expressions are row-level access control predicates evaluated on the server, and SurrealDB explicitly marks $access, $auth, $token, and $session as protected parameters (defined in surrealdb/core/src/cnf/mod.rs) because they carry the authenticated session context. The parser in surrealdb/core/src/syn/parser/stmt/mod.rs accepts a protected name as a FOR loop variable, and the loop executor (core/src/expr/statements/foreach.rs) inserts that value into a child evaluation context via Context::add_value without a protected-name check. Because context lookup in core/src/ctx/context.rs is local-first, the child value is returned before the authenticated parent value is consulted, and the table-permission evaluation path in core/src/doc/check.rs then reads the attacker-controlled binding. This is an improper access control weakness (CWE-863 per the CVE record; CWE-284 per the upstream advisory) rooted in missing validation at a variable-binding boundary rather than in the permission engine itself. Closure arguments appear to follow a similar binding path, but closure exploitation is not confirmed; the confirmed test case used a disposable in-memory server, a database-level VIEWER account, and a table whose SELECT/DELETE predicate referenced $access, $token.like, and $auth.
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:H/VA:H/SC:N/SI:N/SA:N
Remote SurrealQL submission (AV:N) with a straightforward query trick (AC:L) needs an authenticated low-privilege account (PR:L); confirmed read, modify, and delete give C:H/I:H/A:H with no scope change (S:U).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
SurrealDB 1.0.0 before 4.0.0 contains an authorization bypass vulnerability that allows authenticated users to shadow protected $access, $auth, and $token variables by binding them as FOR loop variables. Attackers can wrap queries in nested FOR loops with forged values to satisfy table permission predicates, enabling unauthorized reads, modifications, or deletions as a VIEWER.
Technical POC Analysis
CWE-863 (Incorrect Authorization); the advisory self-classifies as CWE-284, the CVE record as CWE-863.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-134309 is a high-severity vulnerability in SurrealDB (versions 1.0.0 through 3.x) that permits any authenticated user with only the lowest-privilege VIEWER role to bypass record-level permission checks via crafted queries. This undermines the core access-control model, enabling unauthorized data exfiltration, tampering, or deletion within the database; leadership should prioritize remediation given the potential for data integrity and confidentiality breaches, especially in multi-tenant or customer-facing applications.
Apply vendor patch.
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
SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed
Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act
SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow
Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a
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
Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read
Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0
Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an
Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo
EUVD-2026-132247
GHSA-hp3c-r98p-8chh
NVD
CVE.org
EPSS
Exploit-DB