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

GHSA-6VG3-HGRW-P5GF

SurrealDB has an Authorization Bypass via Composite Record-id Paths

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ón141 dDesde la divulgación, 1 jul 2026, 3:12 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
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-6VG3-HGRW-P5GF 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 authenticated user could bypass permission rules that gated access on parts of a record's id — most commonly tenant-isolation rules of the form `PERMISSIONS FOR select WHERE id.tenant = $auth.id.tenant`. The same defect also let UNIQUE constraints defined on parts of an id admit duplicate entries.

When a query referenced part of a composite record id (`id.tenant`, `id.uid`, …), SurrealDB read the value from the record's editable body fields instead of from the immutable id key. Because the body is editable but the id is fixed at creation, an attacker with write access could set the body field to any value and have permission checks read that spoofed value.

Impact

What an attacker can do:

  • Read records hidden by permission rules of the form `id.<field> = $auth.<...>` (typically tenant- or scope-isolation boundaries) by writing the same-named field on a record they control to the spoofed value.
  • Cause UNIQUE constraints defined on `id.<field>` to silently admit duplicate entries, leaving the database with rows that violate the constraint.

What it can't do:

- Cross namespace or database isolation boundaries.
-Bypass field-level `PERMISSIONS FOR` update clauses that don't reference `id.<field>` paths.
- Affect availability or crash the server.

Patches

The value-path resolver now special-cases `Part::Field` and `Part::Value` against `RecordIdKey::Object`, reading the named component directly from the id key without ever entering `select_document`. The Array-keyed special case (`id[0]`, `id[1]`, …) is unchanged.

  • Versions 3.1.0 and later are not affected.
Workarounds

Users unable to patch are advised to consider the following workarounds:
- Avoid permission expressions that read `id.<field>` on Object-keyed record ids; gate on the full record id (`id = $auth.id`) or on a server-derived session value instead.
- Avoid UNIQUE indexes on `id.<field>` until 3.1.0; use `DEFINE INDEX ... ON FIELDS id UNIQUE` (the full id) where possible.

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-6vg3-hgrw-p5gf
Otrahttps://github.com/surrealdb/surrealdb/commit/1fcb19040bfffba92b3f69edb9b707d469e0027b
Otrahttps://github.com/surrealdb/surrealdb

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