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

GHSA-WP87-MGVQ-5J93

SurrealDB: USE NS/DB implicit creation bypasses DEFINE authorization

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ón142 dDesde la divulgación, 1 jul 2026, 3:21 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 nov 26
17 nov 26
20 nov 26
26 may 26
10 jul 26
23 ago 26
7 oct 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.1.0 surrealdb · -36 d desde divulgación
Divulgación Publicada GHSA-WP87-MGVQ-5J93 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

An anonymous caller could create new namespaces and databases on a running SurrealDB instance without holding `DEFINE NAMESPACE` or `DEFINE DATABASE` permission.

`USE NS <name>` and `USE DB <name>` automatically create the target when it does not exist. The three places `USE` is handled — the RPC `use` method, `Datastore::process_use`, and the SurrealQL executor — did not check whether the caller was allowed to create the resource. Under default capabilities any session reached this path, including an unauthenticated guest.

Impact

What an attacker can do:

  • Create new namespaces and databases without `DEFINE NAMESPACE` / `DEFINE DATABASE` permission. An unauthenticated guest is enough under default capabilities.
  • Recreate a parent namespace that an operator deliberately dropped, using a stale namespace-Editor token, by running `USE NS <dropped> DB anything`.
  • Exhaust catalog storage by repeatedly creating new resources.

What it can't do:

  • Read or modify data inside any pre-existing namespace or database.
  • Escalate to root or namespace-owner privileges on existing resources.
  • Affect deployments running with `auth_enabled=false`.
Patches

All three `USE` entry points now check whether the caller has `DEFINE NAMESPACE` / `DEFINE DATABASE` authority before creating a missing target. Sessions still update their context regardless of authorization, so SDKs that send `use` before `signin` continue to work — only the catalog creation step is gated. The parent-namespace side-effect path is closed by the same check.

Versions 3.1.0 and later are not affected.

Workarounds
  • Set `--deny-arbitrary-query *` for guest principals to remove the entry point.
  • Run with `--auth` and require all callers to `signin` before issuing `use`.
  • Revoke namespace-level tokens promptly when a namespace is dropped.
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
Otrahttps://github.com/surrealdb/surrealdb/security/advisories/GHSA-wp87-mgvq-5j93
Otrahttps://github.com/surrealdb/surrealdb/commit/f3ee3bd55533c14f1fa3e69ce18fc8904c1ce3f9
Otrahttps://github.com/surrealdb/surrealdb

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