
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-137490 is a high-severity authorization bypass vulnerability in SurrealDB affecting all versions before 4.0.0. The flaw allows authenticated users with script execution permissions to invoke the JavaScript surrealdb.query() bridge to execute arbitrary database queries beyond their authorized scope, circumventing the Capabilities::allows_query() access control gate. It was published on November 26, 2026, with the underlying security advisory (GHSA-fq69-wr4w-v3gm) originally published by the SurrealDB team on November 3, 2026. The vulnerability carries a CVSS v3.1 base score of 8.8 (High) and a CVSS v4.0 base score of 8.7 (High) (GitHub Advisory, SurrealDB Advisory).
The root cause is a missing authorization check (CWE-862) in surrealdb/core/src/fnc/script/modules/surrealdb/query/mod.rs. While SurrealQL's nested query functions correctly invoke Capabilities::allows_query() before execution, the JavaScript bridge's query() function directly parses and executes input queries without performing this capability check. An attacker who has been granted permission to execute a specific script can exploit this gap to run arbitrary SurrealQL queries that their role would otherwise be prohibited from executing. The fix, introduced in commit 0b8be14543, enforces query and function capability checks inside the embedded JavaScript bridge (SurrealDB Advisory, GitHub Advisory).
A successfully exploited vulnerability allows an authenticated user with script execution permissions to read, modify, or delete data beyond their authorized scope within the SurrealDB instance. This breaks the integrity of role-based access controls, potentially exposing sensitive records, enabling unauthorized data manipulation, or causing data loss through destructive queries. The impact is confined to the vulnerable SurrealDB system itself (subsequent system impact is rated None), but the high confidentiality, integrity, and availability ratings on the vulnerable system reflect the severity of unrestricted database access (GitHub Advisory, SurrealDB Advisory).
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time. The CVE status is listed as "Deferred" and the EPSS score is 0.0, indicating a very low current probability of exploitation. The vulnerability requires low-level authenticated access (script execution permission), which limits the attacker pool but does not require administrative privileges. It has not been added to the CISA Known Exploited Vulnerabilities catalog (GitHub Advisory, Feedly).
surrealdb.query() bridge with an arbitrary SurrealQL query — for example, one that reads all records from a table the subject is not authorized to access: surrealdb.query('SELECT * FROM sensitive_table').DEFINE FUNCTION or inline script call in SurrealQL).surrealdb/core/src/fnc/script/modules/surrealdb/query/mod.rs does not call Capabilities::allows_query(), the query executes without restriction, returning data or performing modifications beyond the subject's authorized scope.DELETE FROM *) that the subject's role would normally prohibit (SurrealDB Advisory).surrealdb.query()) originating from subjects or roles not expected to perform broad or cross-table queries; unexpected SELECT *, DELETE, or UPDATE queries attributed to restricted user sessions.Upgrade SurrealDB to version 4.0.0 or later, which enforces Capabilities::allows_query() and function capability checks within the embedded JavaScript bridge (SurrealDB Advisory). As an interim workaround until patching is feasible, restrict script execution permissions exclusively to fully trusted users and audit all roles that currently hold scripting capabilities. Review and tighten access controls to minimize the number of subjects permitted to execute JavaScript functions within SurrealDB.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."