SurrealDB wave (17 GHSAs): each execution surface skipped the permission check its sibling had¶
Wave in one line: SurrealDB shipped 17 authorization bugs fixed together in 4.0.0 because the permission engine is not one gate, it is a dozen execution surfaces (SurrealQL parser, embedded JS bridge, export endpoint, LIVE queries, transaction commit, reference cascades, MCP sub-protocol, bucket file store), and each surface re-implemented the check or skipped it.
Source: GitHub Security Advisories published 2026-11-21T18:30Z, coordinated wave against SurrealDB 1.0.0 through 3.x (per-leg bands in the table; everything fixed in 4.0.0). This is SurrealDB's second promotional wave after the June 19 boundary batch (with its September 4 PERMISSIONS-clause follow-up), and once again the same-product re-sweep rule paid: the June wave covered graph traversal, ORDER BY oracles, analyzer file reads, and JWKS SSRF; none of this wave's axes were seen then.
Authorized validation only
Disposable single-node surreal start with synthetic namespaces/databases, record users at each role tier, and marker-only rows. Prove on your own instance; never run mutation or cascade legs against a production or third-party database.
Advisory table (legs with durable operator value)¶
| GHSA | CVE | Sev | Boundary |
|---|---|---|---|
| GHSA-cr6h-wmmv-79vp | CVE-2026-134292 | critical | surrealdb.functions bridge calls internal fnc::synchronous()/fnc::asynchronous() dispatchers without function capability checks; a user denied built-ins in SurrealQL executes them from embedded JavaScript |
| GHSA-hp3c-r98p-8chh | CVE-2026-134309 | high | FOR loop variables shadow protected $access, $auth, $token; wrap any query in a nested FOR with forged values to satisfy table PERMISSIONS as a VIEWER |
| GHSA-f33w-ppch-pjc9 | CVE-2026-134310 | high | PERMISSIONS FOR update predicates referencing COMPUTED fields are evaluated before the computed field is populated, so blocked != true sees NONE and passes on protected rows |
| GHSA-3wfp-cfg4-qr44 | CVE-2026-134307 | high | GET /export dumps raw records skipping table SELECT predicates and field-level SELECT permissions |
| GHSA-xm3q-6whx-j32m | CVE-2026-134288 | high | THROW-guarded table events are bypassed inside interactive transactions: begin + guarded statement, ignore the returned error, commit persists the record and the event side effects |
| GHSA-3xxc-3r8v-992v | CVE-2026-134300 | high | Document::purge_references runs REFERENCE ON DELETE cascades across target-table PERMISSIONS: delete a referenced record to delete, unset, or run CUSTOM expressions on rows with PERMISSIONS FOR delete NONE |
| GHSA-32j2-g84w-h3c7 | CVE-2026-134301 | medium | LIVE QUERY WHERE clauses and field projections admit CREATE/UPDATE/DELETE/RELATE subqueries that execute atomically inside other users' triggering transactions |
| GHSA-c88v-jgq3-49rc | CVE-2026-134293 | high | MCP server identifier validator (consume_backtick_ident, validate_identifier) treats the first backtick as closing while the SurrealQL parser honors escapes: an escaped backtick in an MCP tool argument breaks out of the quoted identifier and runs arbitrary SurrealQL |
| GHSA-g48r-q9wv-qhhm | CVE-2026-134291 | high | Filesystem bucket canonicalizes only the bucket root; a pre-existing symlink inside the bucket passes the lexical prefix check and reads/writes across the host filesystem |
| GHSA-v5r5-h44j-cj82 | CVE-2026-134294 | high | Windows bucket keys: ObjectKey::check_no_traversal splits only on / while FileStore::to_os_path treats \ as a separator, so /..\bucket2\secret crosses buckets |
| GHSA-mm4j-wgqm-p565 | CVE-2026-134295 | high | Key-based bucket ACLs evaluated against the un-normalized key while the file store collapses ..: /public/../private/confidential.txt reads, writes, or deletes outside the permitted key prefix |
| GHSA-j3wv-m7wg-4mrm | CVE-2026-134290 | high | Delete blocked by an ON DELETE REJECT reference returns the referencing record id in the error without checking the caller's SELECT permission: a row-existence and id oracle for rows hidden by row-level permissions |
| GHSA-3hpg-ph9p-5cfh | CVE-2026-134306 | medium | filter_fields_by_permission compacts arrays when overlapping items[*] and items[*].secret permissions apply, so shifted elements retain denied field values |
| GHSA-4778-p23j-frcj | CVE-2026-134298 | medium | CREATE on a nonexistent table implicitly defines it without the DEFINE TABLE permission check, so read-only VIEWER roles add SCHEMALESS tables in non-STRICT databases |
| GHSA-gq9j-c8x8-685h | CVE-2026-134299 | high | GET /graphql WebSocket upgrade ignores operator-configured frame/message/buffer limits, falling back to permissive library defaults (~64 MiB in-flight per connection), unauthenticated with ns/db supplied in headers |
| GHSA-77xq-pgc2-9j9g | CVE-2026-134289 | medium | surreal start/sql/import/export/mcp --help prints SURREAL_PASS/SURREAL_TOKEN env values in clear text (clap args omit hide_env_values): root DB credentials in shell and CI logs |
Adjacent in-wave without publication: math::sum/math::product unchecked rust_decimal overflow panics the whole server process (GHSA-p5xq-8q49-h75w / CVE-2026-134302, availability-only but a trivial unauthenticated-adjacent crash where query rights exist), SurrealKV InternalKeyRef OOB read (memory-safety class).
Why this is worth an operator page¶
SurrealQL PERMISSIONS look like one model (row/field predicates per table) but enforcement is replicated at every path that can execute or materialize data. Every leg above is the same meta-bug at a different surface, and the wave gives you the audit checklist for any policy-engine-backed database, not just SurrealDB:
- Enumerate execution surfaces, not clauses. SurrealQL, embedded JavaScript (
surrealdb.functions),/export, LIVE query triggers, interactive transaction commit, reference cascades, MCP tool handlers, bucket file routes. Each was written against the permission model once, and capability checks exist where the author thought of them. Ask: does this surface call the same checker the parser calls? - Predicate evaluation order is a security property. The COMPUTED-field leg shows a deny predicate can read
NONEsimply because it evaluates before the field exists. For any expression-language predicate (Casbin-style, RLS, SurrealQL PERMISSIONS), enumerate fields whose populated state differs at check time vs write time (computed, defaulting, trigger-set), then test the predicate against the pre-populated view. - User-bindable variable namespaces are forgeable inputs. If language syntax lets any user bind
$auth/$access/$token(here via FOR-loop variables), the identity the predicate reads is attacker data. Battery: shadow every reserved variable name through every binding construct the language offers (loops, LET, function params, JS scope). - Two implementations of one grammar = differential. MCP validator vs SurrealQL parser (backtick escape semantics),
/-split validator vs\-splitting path builder, ACL-on-raw-key vs file-on-normalized-key. Run the escape/separator/normalization battery against whichever consumer reads the field, not whichever one validated it. - Rejection errors are oracles when they name resources. The REJECT-reference id leak belongs beside every other "distinct error reveals hidden row" leg (ArcadeDB MCP existence-vs-authorization on the July 16 page).
- Error-path semantics at transaction boundaries. "IGNORED THROW" is a commit-integrity bug class: any engine where a raised guard error can be swallowed client-side before commit should get the begin/guarded-statement/ignore-error/commit test.
Replayable validation workflow (lab only)¶
Prereqs: local surreal start at a pre-4.0.0 tag and at 4.0.0 for the differential, ws/curl, two namespaces, a low-tier record user.
- Capability-surface table. For one denied built-in function and one protected table, record the decision across surfaces: SurrealQL direct,
surrealdb.functionsJS,/export, LIVE-query WHERE subquery, MCP tool arg, interactive transaction (with error ignored), cascade trigger. Any cell that diverges from the parser is a finding. - Shadowing battery. Wrap a protected read in
FOR $auth IN [{...}]style bindings and compare predicates; extend to$access,$token, LET, and function-parameter shadowing. - Pre-population probe. Define a COMPUTED
blockedfield +PERMISSIONS FOR update WHERE blocked != true; attempt the update as a low user and watch for the NONE-at-check-time pass. - Grammar battery on every identifier/key consumer: escaped backtick in MCP args,
/..\x\yon Windows builds,/public/../private/...keys against key-prefix ACLs, pre-planted symlink inside a bucket root. - Oracle and hygiene checks: attempt a REJECT-guarded delete and diff error text against a nonexistent-id attempt; run
--helpwith dummy env credentials to confirm the leak shape before checking target CI logs; unauthenticated/graphqlupgrade with header-supplied ns/db to confirm limits are absent.
Cross-references¶
- Prior SurrealDB legs: June 19 boundary batch incl. the September 4 PERMISSIONS-clause writes and cross-scope DEFINE API fold.
- Delegated-auth and cache-hit-as-distinct-path lineage: Sept 21 auth-precedence page (Shiro auth-cache, FalkorDB error-vocabulary legs).
- Two-parsers-of-one-input differentials: canonicalization differentials methodology.
- MCP transport as an unreviewed sub-protocol: July 16 gateway/mesh page and this wave's ArcadeDB fold on the July 16 ArcadeDB page.
November 26 second follow-up: three more legs join the wave, the JS bridge keeps giving (GHSA-qwm5-4hhw-6vmx / CVE-2026-137490 high, GHSA-mxhj-6r53-8595 / CVE-2026-137489 medium, GHSA-jx28-f8rp-ggvw / CVE-2026-137488 medium; before 4.0.0)¶
Three legs published five days after the wave, same product, same rule validated (same-product re-sweep finds more):
- The JavaScript
surrealdb.query()bridge bypassesCapabilities::allows_query()entirely (GHSA-qwm5-4hhw-6vmx). A subject permitted to run a specific script escapes its predefined-operation set by calling the embedded query API from JS. This is the page's rule 1 restated with a new exhibit: the JS bridge was already the capability-check gap in the first wave (surrealdb.functions); the query entry is a second bridge function that skipped a different checker. Capability audits must enumerate every host function the embedding exposes, not just the obvious dispatcher. - ML export takes the model name as a raw URL:
Url::joinwith an absolute URL inExportMl/ExportBytesMlredirects authenticated requests and captures session tokens (GHSA-mxhj-6r53-8595). Identifier-shaped fields that reach a URL joiner are SSRF candidates (identity-format-strings-are-URLs, July 30 page); "model name" reads as a registry key, tests as a fetch target. Probe: supplyhttps://your-callback/xas any name-typed parameter on export/import/fetch routes and watch for authenticated outbound requests carrying tokens. - Rejection errors name hidden data again: re-
RELATEan edge with mismatched endpoints andInOverride/OutOverrideerror messages return the SELECT-hidden in/out record ids (GHSA-jx28-f8rp-ggvw). Same "distinct error reveals hidden row" family as the wave's REJECT-reference leg; the mutation-diff error path is a fresher probe surface than the read path, add "trigger every validation error on a hidden resource" to the permission-oracle battery.