Advisory · CVE-2026-134292
SurrealDB capability bypass lets authenticated users run denied built-in functions
SurrealDB before 4.0.0 skips capability checks on built-in functions called through its embedded JavaScript bridge, letting authenticated users run functions SurrealQL denies them. The project rates it critical at CVSS 9.8.
- Vendor
- SurrealDB
- Product
- SurrealDB
- Identifier / CWE
- CVE-2026-134292
CWE-862 - Action timing
- Immediate
Explain it like I’m five
SurrealDB keeps a list of which functions each user is allowed to run. The JavaScript door into the database forgot to check that list, so a logged-in user can call functions they were told they could not.
- 01Authenticated access
An attacker with any authenticated SurrealDB account reaches a database that allows embedded JavaScript.
- 02JavaScript bridge
The attacker calls built-in functions through the surrealdb.functions bridge from embedded JavaScript.
- 03Capability check skipped
The bridge dispatches through fnc::synchronous() and fnc::asynchronous() without enforcing the function capability checks that SurrealQL applies.
- 04Denied function runs
Built-in functions the user is denied in SurrealQL execute anyway, with whatever data and side effects they carry.
What happened
SurrealDB disclosed CVE-2026-134292 on November 21, 2026: a capability check bypass in the embedded JavaScript scripting engine of SurrealDB 1.0.0 before 4.0.0. The project rates it critical at CVSS 3.1 9.8 (CVSS 4.0 9.3).
The surrealdb.functions bridge calls the internal fnc::synchronous() and fnc::asynchronous() dispatchers without enforcing function capability checks. Authenticated users who are denied access to built-in functions in SurrealQL can execute those same functions by calling them through surrealdb.functions from embedded JavaScript.
SurrealDB 4.0.0 is unaffected. All releases from 1.0.0 up to, but not including, 4.0.0 are affected.
What to do
- Inventory SurrealDB deployments and identify every instance running a release before 4.0.0.
- Upgrade affected instances to SurrealDB 4.0.0 or later.
- Until patched, restrict which accounts can run embedded JavaScript and limit network access to the database to trusted clients.
- Review query and access logs for embedded JavaScript calls to built-in functions by accounts that should not have them.
- Audit what data and operations those functions could reach on each affected instance, and treat any unexpected access as a possible incident.
- Confirm the deployed version after upgrading.
Management note
Capability checks are the trust boundary between a low-privilege database user and the built-in function set. This flaw lets any authenticated user step around them through the JavaScript bridge, so the exposure is every account that can reach the database, not just administrators. Patching is the priority, and log review matters because the bypass looks like ordinary scripting.