CVE-2026-134306 in SurrealDBinfo

Summary

by MITRE • 11/21/2026

SurrealDB before 4.0.0 contains an incorrect authorization vulnerability in filter_fields_by_permission that allows authenticated record users to read denied child field values. Attackers can query rows where overlapping items[*] and items[*].secret permissions compact arrays, causing shifted elements to retain field values denied by SELECT permissions.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/21/2026

The identified vulnerability represents a critical authorization bypass within SurrealDB versions prior to 4.0.0, specifically residing in the filter_fields_by_permission logic responsible for enforcing row-level security policies. This flaw allows authenticated record users to access data that should be strictly prohibited by their assigned permissions. The core of the issue lies in how the database engine processes array fields when applying permission filters. When a user queries rows containing overlapping items[] and items[].secret permissions, the system attempts to compact arrays based on the allowed fields. However, due to an incorrect implementation of this filtering mechanism, shifted elements within these arrays retain field values that are explicitly denied by SELECT permissions for other parts of the record structure.

From a technical perspective, the vulnerability stems from a failure in state management during array compaction operations. When SurrealDB processes queries involving nested or overlapping array fields with distinct permission sets, it fails to correctly isolate and strip unauthorized data points before returning results. Instead of strictly adhering to the principle of least privilege by removing all denied attributes, the engine performs an incomplete cleanup operation. This results in a scenario where elements that were originally at different indices become adjacent after filtering, inadvertently exposing sensitive information such as secret fields alongside permitted public fields. The attacker exploits this logic error by crafting specific queries that trigger these overlapping array operations, effectively tricking the database into leaking restricted data under the guise of standard authorized access patterns.

The operational impact of this vulnerability is severe for any application relying on SurrealDB for multi-tenant or role-based access control scenarios. Since authenticated users can bypass field-level restrictions, sensitive information such as personal identifiable information, financial records, or proprietary secrets may be exposed to unauthorized parties within the same database instance. This breach undermines the integrity of data isolation mechanisms and violates fundamental security principles regarding confidentiality. In environments where SurrealDB is used for applications requiring strict separation of concerns between different user roles, this flaw could lead to significant regulatory non-compliance and potential legal liabilities due to unauthorized data exposure.

To mitigate this risk, organizations must immediately upgrade to SurrealDB version 4.0.0 or later, where the filter_fields_by_permission logic has been corrected to properly handle array compaction and permission enforcement. Until an upgrade is feasible, administrators should implement strict input validation on client-side applications to minimize complex queries involving overlapping array permissions if possible. Additionally, reviewing existing role-based access control policies ensures that no single user account holds conflicting or overly broad permissions over sensitive nested fields. Monitoring query logs for unusual patterns of array manipulation can also help detect potential exploitation attempts in real-time.

This vulnerability aligns with CWE-269, which describes Improper Privilege Management, as it involves a failure to correctly enforce access control policies based on user roles and specific field-level permissions. Furthermore, the attack vector corresponds to ATT&CK technique T1078, Valid Accounts, since exploitation requires prior authentication but leverages misconfigured or flawed permission logic rather than credential theft. The nature of the flaw also reflects aspects of CWE-209, which concerns the generation of error messages containing sensitive information, although in this case, the exposure is direct data leakage rather than informational disclosure through errors. Addressing these issues requires a comprehensive review of both database configuration and application-level security controls to ensure robust enforcement of authorization policies across all data structures.

Responsible

VulnCheck

Reservation

11/21/2026

Disclosure

11/21/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!