Hold Up! Unrestricted File Upload in Online Notes Sharing Platfor
The profile image upload endpoint on the Online Notes Sharing Platform does not properly restrict the type of file accepted. An attacker with a regular user account could upload a malicious script disguised as an image and then access it directly to execute arbitrary code on the server.
Ever uploaded a profile picture and wondered if it’s really just a picture? Well, in projectworlds Online Notes Sharing Platform 1.0, that seemingly innocent action could be a doorway for attackers.
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 upload handler checks neither the file extension nor the file content, so dangerous file types are saved and later served from a location the web server executes.
Impact
An attacker could steal data, take over the server, or use it to attack other systems, though the text gives no proof that this was demonstrated.
What the attacker needed
A regular user account; access to the profile upload page
The fix
The upload should be restricted with strict validation (extension, size, whitelist), files should be scanned and stored outside the webroot, and the web server should run with least privilege; the text says no official patch is mentioned.
How it was found
- Log in with a regular user account.
- Go to the profile settings and upload a malicious file.
- Access the uploaded file through the browser to execute the code.
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 feature should only accept safe file types, like pictures. Here, the website accepted any file, including a program written in PHP (a language many websites use). If an attacker uploads such a program and then opens it in their browser, the server runs it, which can let the attacker take control of the site.
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.