llamaCVEVulnerability Intelligence
/
Advisory · GitHub · crates.io · surrealdb

GHSA-98FX-66CF-FC7C

SurrealDB: Scraping a TABLE with no available PERMISSIONS to current auth level

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -36 d de la divulgación
Exposición140 dDesde la divulgación, 1 jul 2026, 3:06 p. m.
Detección138 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 3.1.0
Monitoreo
Detectada
26 may 26
1 jul 26
4 sept 26
17 nov 26
19 nov 26
26 may 26
10 jul 26
23 ago 26
6 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.1.0 surrealdb · -36 d desde divulgación
Divulgación Publicada GHSA-98FX-66CF-FC7C divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

A vulnerability was discovered where the user-supplied `WHERE` clause in a `SELECT` statement is evaluated against the full record data before `PERMISSIONS FOR SELECT WHERE` determines whether the principal is authorised to access that record. A side-effecting expression in the `WHERE` clause can exfiltrate record contents before the permission check runs. The same ordering bug affects the `SET`, `MERGE`, `CONTENT` and `PATCH` clauses of update-variant statements (`UPDATE`, `UPSERT-update`, `INSERT ON DUPLICATE KEY UPDATE`, `RELATE-update`).

This vulnerability is confined to the attacker's current database. It does not cross namespace or database isolation boundaries.

Impact

An authenticated user — including Record and Scope users — can read the full contents of any table in the database they are authenticated against, bypassing `PERMISSIONS FOR SELECT WHERE` restrictions on those tables.

The most direct exfiltration method requires scripting functions to be enabled (`--allow-scripting` / `-A`). However, exfiltration via SurrealQL's `THROW` statement is also feasible without scripting functions, and timing-based side-channel extraction is possible in all configurations.

All tables within the attacker's current database, regardless of table-level `PERMISSIONS FOR SELECT WHERE` restrictions on those tables, are vulnerable to this attack. Tables in other databases within the same namespace, or within other namespaces, are not vulnerable.

Patches

A patch has been introduced that runs `check_permissions_table` before any user-supplied expression is evaluated against the record. A new `check_pre_update` helper centralises this ordering on every update-variant code path. Regression tests covering `WHERE`, `SET`, `MERGE`, `CONTENT`, `INSERT ON DUPLICATE KEY UPDATE`, and `RELATE` with `THROW` side-effects are included.

  • Versions 3.1.0 and later are not affected by this issue.
Workarounds

Affected users who are unable to update may want to:

  • Disable scripting functions if not required — remove the `-A` / `--allow-scripting` flag. This blocks the most direct exfiltration method but does not fully mitigate the vulnerability, as `THROW`-based and timing-based exfiltration remain possible.
  • Limit query access — restrict the ability of untrusted principals to run arbitrary `SELECT` queries with user-controlled `WHERE` clauses.
  • Use namespace/database isolation instead of table-level permissions as the primary security boundary where feasible, since the vulnerability is in table-level permission enforcement, not namespace or database isolation.
Versiones

Rangos afectados

Afectada Corregida Última
surrealdb< 3.1.0
3.1.0
4.0.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.iosurrealdb
Corregida 3.1.0 -36 d 4.0.1 no afectada
Versiones corregidas3.1.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-63755
Otrahttps://github.com/surrealdb/surrealdb/security/advisories/GHSA-98fx-66cf-fc7c
Otrahttps://github.com/surrealdb/surrealdb/commit/500f4060349580b9cbb9c07b8112a487551c4616
Otrahttps://github.com/surrealdb/surrealdb
Otrahttps://www.vulncheck.com/advisories/surrealdb-before-permission-bypass-via-where-clause

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.