CVE-2026-137488 in SurrealDB
Summary
by MITRE • 11/26/2026
SurrealDB before 4.0.0 contains an information disclosure vulnerability that allows authenticated users to read SELECT-hidden edge endpoints through InOverride/OutOverride error messages. Attackers with CREATE and UPDATE permission on an edge table can re-RELATE an existing edge with mismatched endpoints to recover stored in/out record ids despite row- or field-level restrictions.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/26/2026
The vulnerability identified in SurrealDB versions prior to 4.0.0 represents a significant information disclosure flaw rooted in the database's handling of graph relationships and error reporting mechanisms. This issue specifically affects authenticated users who possess CREATE and UPDATE permissions on edge tables, allowing them to bypass intended access controls through manipulation of relationship endpoints. The core technical flaw lies in how the system processes InOverride and OutOverride parameters during the re-RELATION operation of existing edges. When an attacker attempts to relate an existing edge with mismatched or unauthorized endpoint record identifiers, the database does not simply reject the request silently but instead returns detailed error messages that inadvertently expose internal state information.
From a technical perspective, this vulnerability exploits the granularity of SurrealDB's permission model and its graph data structure implementation. In SurrealDB, edges represent relationships between nodes (records), and these relationships can be restricted at both row-level and field-level to control visibility. However, when an authenticated user with sufficient write privileges attempts to modify an edge by specifying override values for the incoming or outgoing endpoints that do not match existing valid records or are outside their permission scope, the database engine generates a diagnostic error message. These messages contain specific details about the expected versus provided record identifiers, effectively leaking information about which record IDs exist within those restricted tables. This allows attackers to enumerate hidden resources by observing variations in error responses, turning what should be an access denial into a reconnaissance vector.
The operational impact of this vulnerability is primarily centered on unauthorized data discovery and potential escalation of privileges through enumeration. Although the attacker cannot directly read the content of the protected records via standard SELECT queries due to row- or field-level restrictions, they can infer the existence and structure of hidden edge endpoints. This capability undermines the confidentiality guarantees provided by SurrealDB's access control mechanisms. In environments where sensitive graph relationships are stored in restricted tables, such as social networks, financial transaction links, or organizational hierarchies, this information leakage could reveal critical structural data about the system that should remain private. Attackers can use this enumerated data to map out the database schema more accurately than intended, potentially identifying high-value targets for further exploitation or crafting more sophisticated attacks against other components of the application stack.
This vulnerability aligns with CWE-209, which describes the generation of an error message that includes sensitive information, and CWE-778, insufficient logging on critical events if such disclosures are logged persistently. Furthermore, from a threat modeling perspective using the MITRE ATT&CK framework, this behavior facilitates Discovery techniques, specifically Database Discovery (T1619) or File and Directory Discovery through indirect means like error-based enumeration. The ability to probe for record existence via side-channel information in error messages is a classic pattern of blind SQL injection-style reconnaissance adapted for NoSQL graph databases.
To mitigate this risk, organizations running SurrealDB versions before 4.0.0 must upgrade immediately to version 4.0.0 or later where the issue has been addressed by suppressing sensitive details in error responses related to edge relationship operations. For systems that cannot be upgraded instantly, administrators should implement strict input validation and sanitization layers at the application level to prevent malformed RELATE requests from reaching the database engine directly. Additionally, configuring the database server to log only generic error codes for authentication or authorization failures can reduce the exposure of internal identifiers in both logs and client-facing responses. Regular audits of permission policies are also recommended to ensure that CREATE and UPDATE privileges on edge tables are granted only to services with a legitimate need to manipulate graph relationships, thereby minimizing the attack surface available to potential adversaries.