Skip to main content

SurrealDB CVE-2026-134309

| EUVDEUVD-2026-132247 HIGH
Incorrect Authorization (CWE-863)
2026-11-21 VulnCheck GHSA-hp3c-r98p-8chh
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as low-privilege VIEWER with SurrealQL access
  2. Exploit
    Wrap operation in nested FOR loops binding $access/$token/$auth
  3. Execution
    Forged variables shadow protected session values in permission check
  4. Impact
    Read, 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

surrealdb 1.0.0 <4.0.0

Affected Packages

euvd surrealdb fix: 4.0.0

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

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 8.8 HIGH

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).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 21, 2026 - 18:02 EUVD
CVE Published
Nov 21, 2026 - 16:35 cve.org
HIGH 8.7

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 52% exploitable
Prevalence
Low
newer open-source multi-model database, limited production deployment footprint
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2025-71392 CRITICAL
9.4 Jul 18

Privilege escalation via second-order SurrealQL injection in SurrealDB before 2.0.5, 2.1.5, and 2.2.2 lets an authentica

CVE-2026-134292 CRITICAL
9.3 Nov 21

SurrealDB versions 1.0.0 through 3.x (before 4.0.0) fail to enforce built-in function capability checks inside the embed

CVE-2026-63756 CRITICAL
9.2 Jul 20

Privilege escalation in SurrealDB before v3.1.0 lets unauthenticated attackers hijack the privileges of concurrently-act

CVE-2026-134293 HIGH
8.8 Nov 21

SQL injection in the Model Context Protocol (MCP) server component of SurrealDB 3.1.0 through 3.x (fixed in 4.0.0) allow

CVE-2026-121417 HIGH
8.8 Nov 03

Use-after-free in SurrealDB Core before 3.3.0 can crash or corrupt memory in Rust applications that embed the database a

CVE-2026-63760 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the database with a single Web

CVE-2026-63747 HIGH
8.7 Jul 20

Denial of service in SurrealDB before 3.1.0 lets an unauthenticated remote attacker crash the entire database process wi

CVE-2026-63757 HIGH
8.7 Jul 20

Session hijacking in SurrealDB before 3.1.0 lets unauthenticated attackers enumerate attached session UUIDs through the

CVE-2026-134291 HIGH
8.7 Nov 21

Filesystem bucket path traversal in SurrealDB 3.0.0 before 4.0.0 allows an attacker with bucket-operation access to read

CVE-2026-134294 HIGH
8.7 Nov 21

Cross-bucket file disclosure and modification on Windows affects SurrealDB versions 3.0.0 up to but not including 4.0.0

CVE-2026-134295 HIGH
8.7 Nov 21

Authenticated tenants of SurrealDB 3.0.0 through 3.x can escape key-based ACL boundaries in direct filesystem buckets an

CVE-2026-134299 HIGH
8.7 Nov 21

Memory exhaustion in SurrealDB 3.0.4 through 3.x lets unauthenticated remote clients pin up to 64 MiB of in-flight WebSo

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy