CVE-2026-134298 in SurrealDBinfo

Summary

by MITRE • 11/21/2026

SurrealDB 3.0.0 before 4.0.0 contains an authorization bypass that allows users with the read-only VIEWER role to modify database schema, because CREATE on a nonexistent table implicitly defines it without the DEFINE TABLE permission check applied to explicit definitions. Authenticated VIEWER users can issue CREATE statements in non-STRICT databases to add arbitrary empty SCHEMALESS tables, cluttering schemas or colliding with application table names.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/21/2026

The vulnerability identified in SurrealDB versions prior to 4.0.0 represents a critical authorization bypass rooted in an inconsistency between implicit and explicit schema definition mechanisms. In database systems, role-based access control is essential for maintaining data integrity and preventing unauthorized modifications. However, this flaw exploits the distinction made by the database engine when handling table creation commands based on whether they are executed in STRICT or non-STRICT modes. Specifically, while explicit definitions of tables typically trigger rigorous permission checks requiring DEFINE TABLE privileges, implicit definitions triggered by CREATE statements targeting nonexistent tables bypass these safeguards entirely for users holding only the VIEWER role, which is intended to be read-only.

From a technical perspective, the core issue lies in how SurrealDB processes SQL-like commands within non-STRICT databases. When an authenticated user with the VIEWER role issues a CREATE statement for a table that does not currently exist, the database implicitly creates this new entity without verifying if the user possesses the necessary DEFINE TABLE permissions. This behavior contrasts sharply with explicit schema definitions where such checks are enforced. Consequently, any authenticated user designated as a viewer can effectively escalate their privileges by creating arbitrary empty SCHEMALESS tables. These actions do not require elevated rights because the system treats them as implicit operations rather than formal structural changes requiring administrative approval.

The operational impact of this vulnerability is significant for environments relying on SurrealDB to enforce strict access controls. Attackers with VIEWER credentials can clutter the database schema by generating numerous unnecessary tables, which may degrade performance and complicate maintenance tasks. More critically, these newly created tables can collide with existing application table names or reserved keywords, potentially disrupting normal application functionality. In scenarios where applications rely on specific table structures for data retrieval or processing logic, this collision could lead to unexpected errors, service disruptions, or even unintended data exposure if the attacker subsequently manipulates permissions or injects malicious queries into these newly created containers.

This vulnerability aligns with CWE-269, which describes Improper Privilege Management, as it allows a lower-privileged user to perform actions reserved for higher-privileged roles due to flawed logic in permission enforcement. Furthermore, from the perspective of the MITRE ATT&CK framework, this behavior facilitates lateral movement and persistence within the database environment by allowing unauthorized structural changes that can be leveraged for further exploitation or denial of service attacks through schema pollution. The lack of consistent validation across different command types creates a predictable attack vector that undermines the fundamental security model of role-based access control.

To mitigate this risk, organizations running SurrealDB versions before 4.0.0 should immediately upgrade to version 4.0.0 or later where these authorization checks have been corrected to apply uniformly regardless of whether table creation is implicit or explicit. Until an upgrade is feasible, administrators can implement workarounds such as restricting the ability to execute CREATE statements entirely for VIEWER roles at the network or proxy level if possible, although this may impact legitimate functionality depending on application design. Additionally, monitoring database logs for unexpected schema changes initiated by low-privilege accounts can help detect potential exploitation attempts in real-time. Regular audits of user permissions and strict adherence to least privilege principles are also recommended to minimize the blast radius should similar vulnerabilities be discovered in other components or future versions.

Responsible

VulnCheck

Reservation

11/21/2026

Disclosure

11/21/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!