Skip to content
File upload Write-up Beginner

How i got a fileupload vulnerability so easily

The application allowed a user to change the file extension in the upload request, which bypassed the 24-hour review process and caused the post to be published instantly. The author does not demonstrate code execution, only that the review was skipped.

medium.com

Published on medium.com

First of all lets explain whats a file upload vulnerability, At first i thought its a complicated bug to understand but its it turns out its very easy to reproduce . So to Test for file upload vulnerabilities involves verifying if an application improperly handles user-uploaded files, potentially allowing malicious…

Le_Merdien, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the backend trusted the file extension in the request to decide whether to skip review, instead of validating the file content or enforcing the review step server-side.

Impact

An attacker could bypass the review process and publish posts without moderation, but the text does not show that uploaded files were executed.

What the attacker needed

A user account; ability to create a post with an image

The fix

The review step should be enforced server-side and file types should be validated by content, not by the extension in the request.

How it was found

  1. Create a post with an image upload and capture the request.
  2. Change the file extension in the 'fpath' parameter to a different one, such as png instead of jpg.
  3. Submit the request and observe that the post is approved instantly.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A file upload vulnerability happens when a website lets you send files without checking them properly. Here, the site was supposed to hold posts for review, but by changing the file type in the request, the author got the post approved immediately. This is a logic flaw rather than a code execution bug.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.