GHSA-5XCV-FM6G-4HF3
Quoted Computed-Field Formatter Bypasses Field-Level SELECT Permissions
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-5XCV-FM6G-4HF3 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 |
### Summary
A field-level authorization bypass exists in SurrealDB's query execution engine (`surrealdb/surrealdb`). In `surrealdb/core/src/exec/operators/scan/pipeline.rs`, computed field names are escaped with backticks prior to object insertion, mismatching permission filters.
### Vulnerability Details
- Affected File: `surrealdb/core/src/exec/operators/scan/pipeline.rs` (`build_field_state_raw`, `compute_fields_for_value`)
- Mechanism: Computed fields format their names with `fd.name.to_raw_string()`, which automatically surrounds hyphenated or special identifiers with backticks (e.g., `private-data` becomes `` `private-data` ``). When inserted into the document, the key contains backticks, whereas the schema permission validator checks the raw unescaped name (`private-data`). The permission check fails to match and allows the field to be returned to unauthorized users.
- Impact: Unauthorized disclosure of restricted computed fields.
### Recommended Remediation
Use unquoted raw field names for computed field dictionary keys during document evaluation and projection.
---
Reported by: ARSB
Patches
A patch has been created in the 4.0 execution engine that keys computed fields by their raw, unescaped identifier, so a quoted (backtick-escaped) computed-field name no longer mismatches the field-level SELECT permission and leaks the field.
- Version 4.0.0 and later are not affected by this issue.
References
- SurrealQL Documentation — DEFINE FIELD
https://surrealdb.com/docs/surrealql/statements/define/field - `fix(exec): derive the computed fields a field's SELECT clause reads in its own frame` (commit `d813af6632`)
- `test(doc,catalog): pin quoted and nested field names in write gates and field clauses` (commit `bf6a742fd8`)
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
crates.iosurrealdb |
Corregida | 4.0.0 | 0 d | 4.0.1 no afectada |
4.0.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/surrealdb/surrealdb/security/advisories/GHSA-5xcv-fm6g-4hf3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
