Hunting Hidden Gems: Bug Bounties in the Code of JavaScript
A JavaScript file exposed a File Manager plugin with no access restrictions, letting any user upload files of any type and size up to 2 GB. An attacker could upload malicious files or fill server storage to cause a denial of service.
medium.com
Published on medium.com
Hello everyone! It hasn’t been long since I published my last write-up, so let’s dive straight into the topic.
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 File Manager plugin was deployed without any authentication or authorisation checks and without limits on file type or size.
Impact
An attacker could upload malicious files and could exhaust server storage by uploading many large files, potentially causing a denial of service; the report does not show that code execution was achieved.
What the attacker needed
Access to the target website; ability to reach the upload endpoint
How it was found
- Download all JavaScript files from the target website using a browser extension.
- Manually inspect the saved JavaScript files.
- Find the File Manager plugin code around line 161215.
- Identify that the plugin allows unrestricted uploads of any type and size up to 2 GB.
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.
Websites often ship large JavaScript files that contain hidden features and endpoints. Here, one such file revealed an upload feature that anyone could use without logging in or having permission. That let people put harmful files on the server or waste its disk space until it ran out.
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.