GHSA-CPH5-PM57-9W9C
Direct Filesystem Buckets Permit Path Traversal Across Key-Based ACL Boundaries
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-CPH5-PM57-9W9C 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 path traversal vulnerability exists in SurrealDB's direct filesystem bucket implementation (`surrealdb/surrealdb`). In `surrealdb/core/src/buc/controller.rs` and `store/file.rs`, key permissions are checked against the un-normalized object key, but the backend path collapses `..` sequences via path cleaning.
### Vulnerability Details
- Affected Files: `surrealdb/core/src/buc/controller.rs` (`BucketController::check_permission`), `surrealdb/core/src/buc/store/file.rs` (`FileStore::to_os_path`)
- Mechanism: Access control policy verifies the requested object key before resolution. However, `FileStore::to_os_path` normalizes relative directory components via `.clean()` without calling `check_no_traversal` (which is only present on `PrefixedStore`). A tenant authorized only for keys within `/public/` can supply a key such as `/public/../private/confidential.txt`, which passes permission evaluation and resolves to arbitrary files within the storage root.
- Impact: Unauthorized read, write, and deletion of files outside permitted key boundaries.
### Recommended Remediation
Enforce strict traversal checking (`check_no_traversal`) on all direct `FileStore` key inputs prior to permission evaluation and file system operations.
---
Reported by: ARSB
Patches
A patch has been created that runs the traversal check on the key itself for a direct `file://` bucket, so a `..` key can no longer cross the bucket's key-based ACL boundary.
- Version 4.0.0 and later are not affected by this issue.
References
- `fix(buc): filesystem bucket path traversal via symlinks, Windows backslashes, and direct-bucket keys` (commit `5edf982bf0`)
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-cph5-pm57-9w9cLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
