When an Upload Form Becomes a Foothold: Broad S3 Write Scope
✓ Human-authored analysis; AI used for formatting and proofreading. A signed POST form is the standard pattern for letting a browser upload a file directly to S3 without routing the bytes through your servers. When it works, it works beautifully. When the policy authorising the POST is too broad, every signed URL the server hands out is a write primitive on the entire bucket prefix. Four…
The problem with the upload form is that it allows users to upload files to any key that starts with "files/". This includes files like "files/admin.html" and "files/../etc/passwd" which can lead to unintended consequences such as overwriting unrelated objects or accessing sensitive data. The policy should use an exact key match instead of a prefix match to prevent this.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.