CVE-2026-137490: SurrealDB before 4.0.0 Authorization Bypass via JavaScript surrealdb.query() Bridge
SurrealDB before 4.0.0 contains an authorization bypass vulnerability that allows restricted subjects to execute arbitrary queries by calling the JavaScript surrealdb.query() bridge. Attackers permitted to run a specific script can bypass the Capabilities::allowsquery() gate in the query module to execute unrestricted queries beyond their predefined operations.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.0.0
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker must already be permitted to run a specific JavaScript script in SurrealDB. The issue lets that restricted subject exceed the operations they were originally authorized to perform.
What access does exploitation provide?
The attacker can execute arbitrary, unrestricted queries through the JavaScript surrealdb.query() bridge. This bypasses the Capabilities::allows_query() authorization gate and can affect confidentiality, integrity, and availability.
Are installations running version 4.0.0 affected?
The issue is described as affecting SurrealDB versions before 4.0.0. The provided information does not identify any other affected or fixed versions.