Skip to main content
Vulnerability Database/CVE-2026-109343

CVE-2026-109343: SurrealDB Auth Bypass Vulnerability

CVE-2026-109343 is an authentication bypass flaw in SurrealDB that allows cross-tenant access without proper authorization checks. Authenticated users can switch to other tenants and manipulate data. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-109343 Overview

CVE-2026-109343 is a cross-tenant access vulnerability affecting SurrealDB versions before 3.3.0. The flaw resides in the SurrealQL USE statement, which switches a session to any namespace or database without verifying that the caller's authenticated level covers the target tenant. Authenticated namespace, database, or record users can pivot into another tenant and read, create, update, or delete rows in tables whose permissions allow it, such as PERMISSIONS FULL. The vulnerability is categorized as a broken access control issue [CWE-639] and carries a CVSS 4.0 score of 8.6.

Critical Impact

Any authenticated SurrealDB user can bypass tenant isolation and tamper with data in other namespaces or databases, breaking the multi-tenant trust boundary.

Affected Products

  • SurrealDB versions prior to 3.3.0
  • SurrealQL query language USE statement handler
  • Multi-tenant deployments relying on namespace or database isolation

Discovery Timeline

  • 2026-10-12 - CVE-2026-109343 published to NVD
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-109343

Vulnerability Analysis

SurrealDB organizes data under a hierarchy of namespaces and databases, which serve as the boundary between tenants. Authentication is scoped to a specific level: root, namespace (NS), database (DB), or record. The SurrealQL USE statement allows a session to switch its active namespace or database context during query execution.

In versions before 3.3.0, the USE handler does not verify that the authenticated principal's scope actually encompasses the requested target. A user authenticated to namespace tenant_a can issue USE NS tenant_b DB app and have the session accept the switch. Once the switch succeeds, all subsequent queries execute against the new tenant.

Access is then adjudicated only by table-level PERMISSIONS clauses. Tables declared with PERMISSIONS FULL or similarly permissive rules allow the cross-tenant caller to read, create, update, and delete rows. The breach of isolation leads to confidentiality and integrity loss across every tenant that shares the deployment.

Root Cause

The root cause is a missing authorization check [CWE-639] in the session context switch logic. The implementation treats the USE statement as a context operation rather than a privileged action that must re-validate the caller's level. There is no comparison between the session's authenticated scope and the requested namespace or database before the switch is applied.

Attack Vector

Exploitation requires only valid credentials at any non-root level, including record users. An attacker authenticates normally, then submits a USE NS <victim_ns> DB <victim_db> statement over the standard query interface. Any table in the target tenant with PERMISSIONS FULL or scoped rules satisfied by the attacker's record identity becomes reachable for SELECT, CREATE, UPDATE, and DELETE.

No additional user interaction is required, and the attack is executed over the network against the SurrealDB query endpoint. See the GitHub Security Advisory GHSA-2v9j-645m-pcrq and the VulnCheck Advisory on SurrealDB for additional technical context.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-109343

Indicators of Compromise

  • Query logs showing USE NS or USE DB statements where the target namespace or database differs from the authenticated session's scope.
  • Data modification events (CREATE, UPDATE, DELETE) in tenant tables originating from sessions tied to a different tenant identity.
  • Unexpected read volume against tables declared with PERMISSIONS FULL from accounts without a business need.

Detection Strategies

  • Enable SurrealDB query auditing and parse logs for USE statements, correlating the switched target against the authenticated principal's level.
  • Baseline the set of namespaces and databases each service account legitimately touches, then alert on first-seen cross-tenant switches.
  • Review all tables with PERMISSIONS FULL and treat any access from a non-owning tenant as a high-severity signal.

Monitoring Recommendations

  • Forward SurrealDB logs to a centralized analytics platform and apply detections for cross-scope USE activity.
  • Monitor authentication telemetry for record and database users exhibiting broad query patterns inconsistent with their application role.
  • Track row-count deltas and schema access patterns per tenant to catch bulk exfiltration or tampering across tenant boundaries.

How to Mitigate CVE-2026-109343

Immediate Actions Required

  • Upgrade all SurrealDB instances to version 3.3.0 or later, where the USE statement enforces authenticated-level checks.
  • Inventory tables using PERMISSIONS FULL and tighten them to scope-aware predicates that reference $auth and the active namespace or database.
  • Rotate credentials for namespace, database, and record users that may have been exposed, and audit recent query logs for cross-tenant USE activity.

Patch Information

The fix is included in SurrealDB 3.3.0. The release adds authorization checks to the USE statement so a session cannot switch to a namespace or database outside the caller's authenticated level. Review the GitHub Security Advisory GHSA-2v9j-645m-pcrq for upgrade notes and backport guidance.

Workarounds

  • Deploy separate SurrealDB instances per tenant where upgrading is not immediately feasible, eliminating the shared USE surface.
  • Replace PERMISSIONS FULL with explicit predicates that bind access to the authenticated identity and tenant context.
  • Restrict network access to the SurrealDB query endpoint so only trusted application tiers can submit SurrealQL statements.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.