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

GHSA-PM6C-Q8RH-92M8

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

Texto original en inglés · Ver en español

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.
Rumio tranquila, pero no me olvido de esta.Ni fuego ni humo: solo una tarea pendiente.
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-PM6C-Q8RH-92M8 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 read a field that field-level `SELECT` permissions should have hidden from them, by projecting it out of the `$after` or `$before` event parameter instead of selecting the field by name.

A `LIVE SELECT` delivers a per-subscriber document that has field-level `PERMISSIONS FOR select` applied, so a field the subscriber may not read is cut from the notification payload. The `$value`, `$before`, and `$after` parameters, however, were bound to the unreduced record. A subscriber authorised for the table but not for a field could root a projection at one of those parameters and copy the restricted value straight into the notification:

LIVE SELECT $after.hidden AS leaked FROM test;

`$after` carried the new record on `CREATE` and the post-update record on `UPDATE`; `$before` carried the pre-delete record on `DELETE`. The alias placed the value under a name the payload's field filter did not treat as the restricted field, so it survived into the result. The table's own `SELECT` permission was still enforced, so the subscriber only received records they were already entitled to see — the disclosure was confined to fields within those records.

A related path, testing the restricted field in the `WHERE` clause and observing whether a notification arrives, is covered by GHSA-jm88-9wvx-6h4q https://github.com/surrealdb/surrealdb/security/advisories/GHSA-jm88-9wvx-6h4q. 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, receive that field's value in notifications by projecting it out of `$before` / `$after`, for every record the subscription already delivers, across `CREATE`, `UPDATE`, and `DELETE`.
  • Recover the exact stored value, not merely its presence.

What it can't do:

  • 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.
  • Escape field-level scope: only fields on the subscribed table's own records are exposed. System users (root, namespace or database users) are unaffected, as they may already read every field.
Patches

`LIVE SELECT` now binds `$value`, `$before`, and `$after` to the same per-subscriber reduced views used for the notification payload, so a projection rooted at those parameters can no longer read a field the subscriber may not select. Both the pre- and post-mutation images are reduced, so `CREATE`, `UPDATE`, and `DELETE` are all covered, in full-document and `DIFF` mode alike.

  • 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-pm6c-q8rh-92m8

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