[LOW] Deletion token accepted in the URL (?token=), leaking a bearer secret into logs/history #143
Notifications
Total Time Spent: 1 hour 25 minutes
fen
1 hour 25 minutes
No due date set.
Dependencies
No dependencies set.
Reference: poslop/palette#143
Reference in New Issue
Block a user
handleDeletePaste accepts the deletion token via ?token= and the paste view JS fetches /api/pastes/{id}/redeem?token=. URL-carried bearer tokens end up in Traefik access logs and browser history; anyone with log access can delete/redeem the paste. Lower impact than an admin key since scope is one paste, but the same class of issue.
Repro
Found during exploratory security/bug pass on palette-dev (2026-09-09). Reporting only, no fix attached.
Fix proposal: accept the deletion token only in the X-Deletion-Token header (and in the POST body of the UI flow), remove the ?token= query path, and redirect-strip tokens from URLs. One-file change in the deletion handler plus template updates.
QA passed on live palette-dev (image @sha256:813958aa..., merge commit
fe75dfcon dev).Note: QA found the PR initially never SET the tok_ cookie (read-only in web.go), which would have broken the one-time created-banner token display; fixed on the branch (commit
00aaafe) with tests before merge.Closing, branch deleted.