[MEDIUM] Admin key accepted via ?key= query parameter leaks the secret into proxy access logs #137
Notifications
Total Time Spent: 25 minutes
fen
25 minutes
No due date set.
Dependencies
No dependencies set.
Reference: poslop/palette#137
Reference in New Issue
Block a user
adminKeyOK (internal/api/admin.go) falls back to r.URL.Query().Get("key") when the X-Admin-Key header is absent. Any admin API call made this way puts the full admin key into Traefik access logs, browser history, and Referer headers. Accepting the key only via the header would eliminate the leak.
Repro
Found during exploratory security/bug pass on palette-dev (2026-09-09). Reporting only, no fix attached.
Pentest pass summary (palette-dev, 2026-09-09)
Unauthenticated + normal-user exploratory pass across rate limiting, admin authz, paste/attachment abuse, injection, info leakage, DOS, and functional UX. Issues filed from this pass: #137 #138 #139 #141 #142 #143 #144.
Verified resilient (no issue filed):
Severity counts: 0 critical, 0 high, 2 medium (#137 #141), 5 low (#138 #139 #142 #143 #144). E2EE out of scope per owner.
Fixed in PR #150: admin key is now accepted only via the X-Admin-Key header; the ?key= fallback is removed (repro now returns 401). Header path re-verified 200. Log: 20m.