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

GHSA-M887-2246-MGW3

VIEWER role can define tables implicitly via CREATE on a non-STRICT database

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

Parche disponible
Descargar PNG JSON
CVSS
—
low
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición18 dDesde la divulgación, 3 nov 2026, 10:51 a. m.
Detección17 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 la severidad declarada por GHSA (baja) 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.
Tranquilidad nivel Chimborazo nevado.Hasta mi siesta tiene más impacto.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 4.0.0
Monitoreo
Detectada +1
3 nov 26
20 nov 26
21 nov 26
3 nov 26
8 nov 26
12 nov 26
17 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-M887-2246-MGW3 divulgada
Remediación Parche 4.0.0 surrealdb · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Version: `surreal version`: 3.2.0 for linux on x86_64. Seen first on a RocksDB-backed server, reproduced on an in-memory one.

Summary: a user with the `VIEWER` role can change a database's schema. `CREATE` on a table that does not exist yet, in a database that is not `STRICT`, returns `OK` and leaves a new table defined as `TYPE ANY SCHEMALESS PERMISSIONS NONE` (0 rows). An explicit `DEFINE TABLE` by the same user is correctly refused ("IAM error: Not enough permissions to perform this action"), so the implicit definition bypasses the check that the explicit one applies.

Reproduce (fresh server: `surreal start --user root --pass root memory`):

As root:

DEFINE NAMESPACE n; USE NS n; DEFINE DATABASE loose; DEFINE DATABASE strict STRICT;
DEFINE USER v ON ROOT PASSWORD 'v' ROLES VIEWER;
USE NS n DB loose; DEFINE TABLE t SCHEMALESS; CREATE t:1 SET a = 1;

As `v` (ns `n`, db `loose`):

CREATE probe_new:x SET a = 1;   -- OK, returns []
DEFINE TABLE probe_defined;     -- ERR: IAM error: Not enough permissions
UPDATE t:1 SET a = 2;           -- OK, returns [], row unchanged (expected)

As root: `INFO FOR DB;` now lists `probe_new` (`DEFINE TABLE probe_new TYPE ANY SCHEMALESS PERMISSIONS NONE`), 0 rows.
In db `strict` the same `CREATE` by `v` returns "The table 'probe_new' does not exist" (expected).

Impact: a read-only credential (e.g. one given to a backup or reporting job) can add arbitrary empty tables to any non-STRICT database it can reach. No data is read or changed beyond that, but it is a schema write by a role documented as read-only, and it can clutter or collide with table names an application later defines.

Expected: a `VIEWER` statement that would implicitly define a table is refused the same way an explicit `DEFINE TABLE` is.

Workaround we plan: set every database reachable by VIEWER users to STRICT.

Patches

A patch has been created that requires DEFINE TABLE authority before a table is defined on demand, so a VIEWER can no longer implicitly create a table via CREATE on a nonexistent table.

  • Version 4.0.0 and later are not affected by this issue.
References
  • SurrealQL Documentation — DEFINE TABLE https://surrealdb.com/docs/surrealql/statements/define/table
  • `fix(exec): require DEFINE TABLE authority to define a table on demand` (commit `2598b3b0ad`)
Versiones

Rangos afectados

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

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.iosurrealdb
Corregida 4.0.0 0 d 4.0.1 no afectada
Versiones corregidas4.0.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-m887-2246-mgw3

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