
File upload features, such as avatars, attachments and document imports, are a favourite target. If the server trusts the file name, extension or content type sent by the browser, an attacker can upload something far more dangerous than a picture.
The attacker uploads a script disguised as an image, a file with a double extension, or a "polyglot" that is valid as two file types at once. If the file lands in a web-accessible folder and the server executes it, the attacker has a web shell. Very large files can also exhaust disk space or memory.
Content-Type and Content-Disposition: attachment.No. Attackers can fake extensions and MIME types. Verify the file content, rename files and store them outside the web root.
Yes. SVG files and HTML disguised as images can run scripts if they are served with an unsafe content type from your domain.
Try Vooki Pro free for 7 days
Make sure your upload forms accept files, not attacks. The trial unlocks every feature for 7 days, and scanning runs on your own machine.
Related: Path traversal, local and remote file inclusion · Cross-site request forgery (CSRF)