Task: Harden File Upload Validation on AWS S3 Endpoints #352
Labels
No labels
accessibility
api
auth.js
backend
copy
database
defect
dependencies
design
discussion
documentation
duplicate
enhancement
epic
feature
front-end
good first issue
help wanted
invalid
next.js
noscript
on hold
operations
optimization
postgresql
prisma
prototype
question
react
spike
stale
story
tailwind
vulnerability
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SSE/WebsiteTheSSEquel#352
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Harden File Upload Validation on AWS S3 Endpoints
Description
The profile picture upload endpoint (next/app/api/aws/profilePictures/route.ts) checks contentType.startsWith("image/") to validate uploads, but Content-Type is a client-supplied header that can be forged. This allows an attacker to upload arbitrary files (scripts, HTML, SVGs with embedded JS) by spoofing the header. Server-side validation must be used instead.
Associated Epic: #346
Subtasks
Acceptance Criteria