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

GHSA-JM88-9WVX-6H4Q

Field-level SELECT permissions bypassed in LIVE query WHERE clauses via `$before` / `$after`

Parche disponible
Descargar PNG JSON
CVSS 3.1
4.3
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -4 d de la divulgación
Exposición54 dDesde la divulgación, 28 sept 2026, 6:15 a. m.
Detección53 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Hoy toca mantenimiento, no heroísmo.Rumio tranquila, pero no me olvido de esta.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 3.3.0
Monitoreo
Detectada +1
24 sept 26
28 sept 26
20 nov 26
21 nov 26
24 sept 26
9 oct 26
23 oct 26
7 nov 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.3.0 surrealdb · -4 d desde divulgación
Divulgación Publicada GHSA-JM88-9WVX-6H4Q divulgada · CVSS 4.3 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

A subscriber to a `LIVE SELECT` query could determine the value of a field that field-level `SELECT` permissions should have hidden from them, by testing it in the query's `WHERE` clause through the `$after` or `$before` event parameter and observing whether a notification was delivered.

A `LIVE SELECT` `WHERE` clause is evaluated against a per-subscriber document that has field-level `PERMISSIONS FOR select` applied. The `$value`, `$before`, and `$after` parameters, however, were bound to the unreduced record, so a predicate rooted at one of them tested the field's real value:

LIVE SELECT * FROM test WHERE $after.hidden = 123;

The notification payload could still omit the restricted field, but whether a notification arrived at all depended on the restricted value, turning delivery into a boolean oracle. Repeating with different comparisons let a subscriber confirm a guessed value or narrow a range. `$after` covered `CREATE` and `UPDATE`; `$before` covered the pre-delete value on `DELETE`. The table's own `SELECT` permission was still enforced, so the oracle only spoke about records the subscriber was already entitled to receive.

A related path, copying the restricted field into the notification through the projection, is covered by GHSA-pm6c-q8rh-92m8 https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pm6c-q8rh-92m8. The same change in 3.3.0 fixes both.

Impact

Only databases that use field-level `SELECT` permissions — `DEFINE FIELD ... PERMISSIONS FOR select NONE`, or a restricting `WHERE` — to hide a field from users who can otherwise read the table are affected. This is a confidentiality issue at the field-permission boundary.

What an attacker can do:

  • With permission to run a `LIVE SELECT` on a table (a record user is enough) but no permission to read a particular field, use a `WHERE` predicate over `$before` / `$after` to test that field and infer its value from whether a notification is delivered, across `CREATE`, `UPDATE`, and `DELETE`.
  • Confirm exact values or narrow ranges through repeated crafted predicates.

What it can't do:

  • Read the field's value directly from the payload; the disclosure is by inference from delivery, one predicate at a time.
  • Reach records the subscription is not already entitled to. This issue does not bypass table-level permissions, and exposes nothing across tables, namespaces, or databases.
  • Modify data — this is read-only disclosure. System users (root, namespace or database users) are unaffected.
Patches

`LIVE SELECT` now binds `$value`, `$before`, and `$after` to the same per-subscriber reduced views used elsewhere in delivery, so a `WHERE` predicate rooted at those parameters can no longer test a field the subscriber may not select: the field reads as `NONE`, exactly as it does in the payload. Both the pre- and post-mutation images are reduced, so `CREATE`, `UPDATE`, and `DELETE` are all covered.

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

Users unable to patch should consider the following workarounds:

  • Do not rely on field-level `SELECT` permissions to hide values on a table that untrusted users can subscribe to; keep sensitive fields in a separate table or database those users cannot read at all, or restrict at the table level.
  • Deny live and arbitrary queries to untrusted principal classes with `--deny-arbitrary-query` (env `SURREAL_CAPS_DENY_ARBITRARY_QUERY`), for example for `guest` and `record`, which also blocks the `LIVE` RPC for those classes.
References
  • SurrealQL Documentation — LIVE SELECT https://surrealdb.com/docs/surrealql/statements/live
  • SurrealQL Documentation — DEFINE FIELD https://surrealdb.com/docs/surrealql/statements/define/field
  • SurrealQL Documentation — DEFINE TABLE … PERMISSIONS https://surrealdb.com/docs/surrealql/statements/define/table
  • `fix(doc): bind LIVE $value/$after/$before to reduced views` (included in SurrealDB 3.3.0)
Acknowledgements

Thank you to arbor-s https://github.com/arbor-s for reporting this issue.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

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

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.iosurrealdb
Corregida 3.3.0 -4 d 4.0.1 no afectada
Versiones corregidas3.3.0
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/surrealdb/surrealdb/security/advisories/GHSA-jm88-9wvx-6h4q

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