diff --git a/.planning/todos/pending/2026-10-11-uploads-keep-client-extension-stored-xss.md b/.planning/todos/pending/2026-10-11-uploads-keep-client-extension-stored-xss.md new file mode 100644 index 0000000..63ed795 --- /dev/null +++ b/.planning/todos/pending/2026-10-11-uploads-keep-client-extension-stored-xss.md @@ -0,0 +1,32 @@ +--- +created: 2026-10-11T00:00:00Z +title: Uploads keep the client file extension, so a valid image can be served as HTML (stored XSS) +priority: high +area: lagoon/attach, fonoteka.go uploads +severity: major +g15office: bemfi2zs +files: + - ../fonoteka.go/plugins/golem15/fonoteka/controllers/api/collection_media_controller.go (storeUpload) + - ../fonoteka.go/plugins/golem15/fonoteka/classes/album_files.go (StorePublicFile) + - modules/lagoon/attach +--- + +## Problem + +Found in the Phase 12 code review (WR-01 in `.planning/phases/12-p-ytarium-api-collections-and-albums/12-REVIEW.md`). + +Public uploads keep the extension the client sent. The web server serves `storage/app/uploads/public` and picks the Content-Type from the extension; the blob's `ContentType` metadata does not reach it. A PNG with `