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-109334 Overview
CVE-2026-109334 is a cross-tenant access vulnerability in SurrealDB before version 3.3.0. The database fails to validate the caller-selected namespace or database against the authentication level of the system user. An authenticated attacker with namespace- or database-level credentials can pivot into other tenants by setting the Surreal-NS and Surreal-DB headers on the /sql endpoint, or by invoking the RPC use method. Where table PERMISSIONS allow, the attacker can read, create, modify, and delete rows and read DEFINE PARAM values in tenants outside their authentication scope. The flaw is tracked under [CWE-639] (Authorization Bypass Through User-Controlled Key).
Critical Impact
Authenticated users can breach tenant isolation boundaries, exposing data confidentiality and integrity across multiple namespaces and databases on the same SurrealDB instance.
Affected Products
- SurrealDB versions prior to 3.3.0
- Deployments exposing the /sql HTTP endpoint to namespace- or database-level system users
- Multi-tenant SurrealDB instances relying on namespace/database isolation
Discovery Timeline
- 2026-10-12 - CVE-2026-109334 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-109334
Vulnerability Analysis
SurrealDB implements a hierarchical access model where system users authenticate at root, namespace, or database scope. The expected behavior constrains a user's operations to the scope where their credentials were issued. In versions before 3.3.0, SurrealDB processes the caller-supplied Surreal-NS and Surreal-DB HTTP headers, and the RPC use method, without cross-checking them against the authenticated user's scope. The result is a horizontal privilege escalation across tenants.
An attacker holding valid namespace- or database-level credentials can rewrite the active session context and operate against another tenant. Access is still filtered by the target tables' PERMISSIONS clauses, so tables with permissive rules become fully reachable. Attackers can also read DEFINE PARAM values in the target tenant, potentially exposing configuration secrets or application-level constants.
Root Cause
The root cause is missing authorization enforcement when the session namespace or database is changed at runtime. SurrealDB trusts the client-selected tenant identifier instead of validating it against the authentication boundary. This matches [CWE-639], where access control decisions depend on a key that the attacker controls.
Attack Vector
Exploitation requires network access to the SurrealDB endpoint and a valid namespace- or database-scoped account. The attacker authenticates normally, then issues requests to /sql with Surreal-NS and Surreal-DB headers pointing at a foreign tenant, or calls the RPC use method with the target namespace and database. Subsequent SELECT, CREATE, UPDATE, DELETE, and parameter-read operations execute against the attacker-selected tenant subject only to table permission checks.
No exploitation code is reproduced here. Technical details are available in the GitHub Security Advisory and the VulnCheck Advisory for SurrealDB.
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 AttacksDetection Methods for CVE-2026-109334
Indicators of Compromise
- HTTP requests to /sql containing Surreal-NS or Surreal-DB header values that do not match the authenticated user's issued scope.
- RPC calls invoking the use method with target namespace or database identifiers outside the caller's authentication boundary.
- Query logs showing a single authenticated session touching tables across multiple namespaces or databases within a short time window.
- Unexpected reads of DEFINE PARAM values originating from non-root-scoped accounts.
Detection Strategies
- Correlate authentication events with subsequent query targets to identify sessions that pivot between tenants.
- Alert on any session whose namespace or database context changes after initial authentication without a privileged administrative action.
- Baseline per-user tenant access patterns and flag deviations where a namespace-scoped user accesses foreign namespaces.
Monitoring Recommendations
- Enable verbose request logging on SurrealDB and forward it to a centralized analytics platform for retention and search.
- Monitor for anomalous DEFINE PARAM read operations and bulk mutations across tenant boundaries.
- Track failed and successful authorization checks on multi-tenant tables, especially those with permissive PERMISSIONS clauses.
How to Mitigate CVE-2026-109334
Immediate Actions Required
- Upgrade all SurrealDB instances to version 3.3.0 or later without delay.
- Audit existing namespace- and database-level system users and rotate credentials for any account with suspected cross-tenant activity.
- Review table PERMISSIONS clauses and DEFINE PARAM definitions in every tenant to minimize data reachable under permissive rules.
- Restrict network exposure of the SurrealDB /sql and RPC endpoints to trusted application tiers only.
Patch Information
SurrealDB 3.3.0 resolves the issue by validating the caller-selected namespace and database against the authenticated user's scope. Refer to the GitHub Security Advisory GHSA-w5v9-jc5f-5rmc for the authoritative fix details and version matrix.
Workarounds
- If immediate upgrade is not possible, restrict access to SurrealDB so that only root-scoped administrators or trusted application identities can reach the /sql endpoint and RPC interface.
- Tighten table PERMISSIONS on all multi-tenant tables so that cross-tenant reads and writes fail even if session context is changed.
- Place SurrealDB behind a reverse proxy that strips or validates Surreal-NS and Surreal-DB headers against the authenticated identity.
# Example: reverse proxy rule to drop client-supplied tenant headers
# (Adapt to your proxy of choice; validate against your auth context before forwarding.)
proxy_set_header Surreal-NS "";
proxy_set_header Surreal-DB "";
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

