GHSA-WW75-G8RR-CQQV
Path traversal in cloud_store.delete_path allows users with execute but not update permission to delete files outside root_path
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-WW75-G8RR-CQQV divulgada · CVSS 8.1 (GitHub) | |
| Remediación | Parche v0.13.8 | github.com/daptin/daptin · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Resolution
Fixed in v0.13.8 https://github.com/daptin/daptin/releases/tag/v0.13.8 by commit `d55211b0` https://github.com/daptin/daptin/commit/d55211b08aa78f537f8a1951e2e6d41ecdfbe7ce. The fix centralizes storage-root confinement and applies it to delete, move, create, upload, asset, site, template, and FTP paths.
Summary
The `delete_path` action on `cloud_store` concatenates a caller-supplied `path` onto the store's configured `root_path` without confining the result to that root. For a local-backed store the joined path reaches `os.RemoveAll` / `os.Remove` directly.
A user holding peek, read and execute but not update on a store — and therefore no ability to change `root_path` — can delete files and directories outside that root, up to whatever the Daptin process can write.
Affected versions
- Confirmed affected: 0.13.6 (`c7c9586251194991ec662464df5614427b09f4ee`)
- Affected: 0.11.4 through 0.13.7 — the unconfined local-filesystem delete branch was introduced by `4b870fa0`, included in `v0.11.4`, and remained present through `v0.13.7`.
- Current `master`: fixed by `d55211b0`
- Fixed version: 0.13.8
Weakness
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Details
Root cause
`server/actions/action_cloudstore_file_delete.go:68-74`
if atPath != "" {
if !EndsWithCheck(rootPath, "/") && !resource.BeginsWith(atPath, "/") {
rootPath = rootPath + "/"
}
rootPath = rootPath + atPath // caller-controlled, unvalidated
}
rootPath = path.Clean(rootPath) // normalizes ../ — does not confine`path.Clean` resolves `../` segments rather than rejecting them, so the result can lie outside `root_path`. For a local store (`root_path` containing no `:`) the value flows to `:142-166`:
absPath, _ = filepath.Abs(rootPath)
stat, _ := os.Stat(absPath)
if stat.IsDir() { os.RemoveAll(absPath) } else { os.Remove(absPath) }No `filepath.Rel` or prefix check exists on this path.
Call chain, all confirmed in source
- `POST /action/cloud_store/delete_path` — action defined at `server/resource/columns.go:838-849` (InField `path`), performer `site.file.delete` → `server/action_provider/action_provider.go:91` → `action_cloudstore_file_delete.go`
- Authorization — `server/resource/handle_action.go:288-302` checks `CanExecute` on the target `cloud_store` row and on the action. Path scope is not checked.
- Field validation — `GetValidatedInFields` (`handle_action.go:1348-1370`) checks presence/required only; `delete_path` declares no `Validations` or `Conformations`.
- Outcome evaluation — `path: "~path"` (`server/resource/columns.go:858`) → `EvaluateString` `~` branch (`handle_action.go:1229-1252`) returns `inFieldMap["path"]` verbatim.
- Performer — the concatenation above, then `os.RemoveAll` / `os.Remove` in the goroutine at `:109`.
Relationship to prior advisories
Not a duplicate of any published advisory, but the same defect class as one already fixed elsewhere in this subsystem:
- GHSA-9cp7-j3f8-p5jx (Unauthenticated Path Traversal and Zip Slip, CWE-22, 2026-04-10) — fix commit `8d626bbb` hardened `file.upload`, the import path, asset handling, and FTP. `delete_path` was not included; v0.13.8 now applies the shared confinement boundary to it and the sibling paths.
- GHSA-m448-4fvc-4chj (FTP access control) — fix commit `11a41bfe` introduced `containedPath` in the FTP driver. Different component; this report proposes reusing that helper.
- The 2026 SQL injection advisories (GHSA-hq2p, GHSA-pwqg, GHSA-rw2c, GHSA-8pjw) are CWE-89 and unrelated.
Before v0.13.8, the most recent commit touching `action_cloudstore_file_delete.go` on `master` was from 2026-01-27 and the file was unpatched.
PoC
Environment contained entirely under `/tmp/daptin-repro`:
/tmp/daptin-repro/store/legit.txt <- cloud_store root_path
/tmp/daptin-repro/outside/canary.txt <- outside the rootSetup — a normal permission state, not the open bootstrap state:
- Fresh database; user A signs up and calls `become_an_administrator`, so the instance is in its normal permission state
- A creates a `cloud_store` (`store_type: local`, `store_provider: localstore`, `root_path: /tmp/daptin-repro/store`)
- User B signs up — non-administrator, member of `users` (id 3) only
- B is granted access without update on that store: the row is linked to `users` with connection permission `573440` = `GroupPeek | GroupRead | GroupExecute`. `GroupUpdate` is deliberately excluded. The row's own permission is `0`, so this link is B's only access path.
Permission evaluation happens at the group tier in `server/permission/permission.go` — `CanExecute` (`:64`) tests `oGroup.Permission & GroupExecute`, `CanUpdate` tests `oGroup.Permission & GroupUpdate` — so execute and update are separable exactly this way.
V1 — can B move the boundary?
PATCH /api/cloud_store/<id> (attempt to change root_path)`403`. Log: `[table] [cloud_store] access not allowed for action [PATCH] to user [01a0852b-1bbc-...]`
`root_path` unchanged, still `/tmp/daptin-repro/store`.
V2 — can B delete outside the boundary?
POST /action/cloud_store/delete_path
{"attributes": {"cloud_store_id": "<ref>", "path": "../outside/canary.txt"}}`200` — `{"message": "Cloud storage deletion queued"}`
Log:
[49] Delete target path: /tmp/daptin-repro/outside/canary.txt
File deleted successfully: /tmp/daptin-repro/outside/canary.txt
Delete operation completed successfully for path: /tmp/daptin-repro/outside/canary.txtNo `not allowed action` line — authorization passed and the performer ran.
File state:
before: /tmp/daptin-repro/outside/canary.txt (16 bytes)
after: /tmp/daptin-repro/outside/ (empty)
/tmp/daptin-repro/store/legit.txt (unchanged)Deletion runs in the async goroutine at `:109`, so the effect appears shortly after the request returns `queued`.
The only attacker-controlled value is `path`; `root_path` is read from the store record.
Impact
A user with execute but not update permission on a `cloud_store` can delete arbitrary files and directories reachable by the Daptin process, potentially including `daptin.db` and configuration files. We verified deletion of a file outside the configured root; we did not attempt deletion of application files.
`root_path` is the field that defines a store's boundary. V1 shows this user cannot legitimately redefine that boundary; V2 shows they can act outside it anyway. The grant of execute permission is intended to scope operations to the store's contents, and it does not.
Because the required permission is execute without update rather than administrative, this is reachable by any non-administrator a deployment has granted execute access to a `cloud_store`. We have not surveyed how common that configuration is in practice — we are describing the permission model the code implements, not an observed deployment pattern.
Potentially affected code path (not reproduced)
`server/actions/action_cloudstore_path_move.go:44-61` performs the same unconfined join, with no `path.Clean` at all — only leading-slash normalization:
sourcePath, _ := inFields["source"].(string)
destinationPath, _ := inFields["destination"].(string)
rootPath := inFields["root_path"].(string)
// ... leading "/" normalization only ...
destParentDir := filepath.Dir(rootPath + destinationPath)
args := []string{ rootPath + sourcePath, destParentDir }The reporter did not reproduce a move outside the root. The v0.13.8 fix applies the same confinement authority to both source and destination paths.
Implemented fix
`server/ftp_server.go:246-283` already implements correct confinement — `filepath.Rel` plus a `..` prefix check, and symlink resolution against the resolved root:
pathFromRoot, err := filepath.Rel(rootPath, fullPath)
if err != nil || pathFromRoot == ".." || strings.HasPrefix(pathFromRoot, ".."+string(filepath.Separator)) {
return "", errors.New("path escapes site root")
}v0.13.8 extracts the established confinement behavior into a shared filesystem helper and routes every caller-controlled cloud-store operation through it, including local symbolic-link checks.
Credit
Reported by @moovingGun. Per the repository SECURITY.md, please request a CVE identifier if this report is accepted, and credit me in the advisory and release notes.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/daptin/daptin |
Corregida | v0.13.8 | 0 d | v0.13.57 no afectada |
0.13.8v0.13.8Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/daptin/daptin/security/advisories/GHSA-ww75-g8rr-cqqvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
