GHSA-6C37-X4JM-529X
Windows Backslashes Bypass Global Bucket Path Traversal Protection
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-6C37-X4JM-529X 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 bypass exists on Windows platforms within SurrealDB's bucket storage layer (`surrealdb/surrealdb`). In `surrealdb/core/src/buc/store/path.rs`, traversal validation splits only on forward slashes (`/`), ignoring backslashes (`\`).
### Vulnerability Details
- Affected Files: `surrealdb/core/src/buc/store/path.rs` (`ObjectKey::check_no_traversal`), `surrealdb/core/src/buc/store/file.rs` (`FileStore::to_os_path`)
- Mechanism: `ObjectKey::check_no_traversal` validates path components by splitting exclusively on `/`. When deployed on Windows hosts, `FileStore::to_os_path` utilizes the operating system path separator where `\` represents directory hierarchy. An object key such as `/..\bucket2\secret` bypasses forward-slash validation, yet is interpreted as directory traversal during OS file path resolution.
- Impact: Cross-bucket file disclosure and modification on Windows installations.
### Recommended Remediation
Normalize path separators or reject keys containing `\` in `check_no_traversal` before path resolution.
---
Reported by: ARSB
Patches
A patch has been created that treats a backslash as a path separator when checking a bucket key for traversal, closing the Windows backslash bypass.
- 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-6c37-x4jm-529xLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
