**🚀 Upload File ➡️ Stored XSS ➡️ Admin Takeover! MinIO Misconfiguration Story 🎣**
The server allowed unauthenticated PUT uploads to a MinIO bucket, so the authors uploaded an SVG that executed JavaScript when viewed, and then overwrote the admin panel's JavaScript file to run their own code. An attacker could steal an admin's session cookie and take over the admin account.
Free Link
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 MinIO bucket permitted unauthenticated PUT requests and the application served uploaded files, including SVG and admin JavaScript, from that writable public storage without sanitisation.
Impact
An attacker could run JavaScript in an admin's browser, steal their session cookie, and potentially hijack the session, send CSRF payloads, or plant a keylogger.
What the attacker needed
Unauthenticated network access to the host; admin visits the affected page
The fix
The team patched MinIO and revoked PUT access for sensitive paths; more generally, public writable storage should not serve admin scripts or unsanitised SVG uploads.
How it was found
- Send an unauthenticated PUT request to upload an SVG file containing a script to the MinIO-backed host.
- Open the uploaded SVG in a browser and observe the script executing.
- Locate the admin panel's JavaScript file on the same bucket.
- Send another PUT request to overwrite that JavaScript file with attacker-controlled code.
- Refresh the admin page and observe the injected code running.
- Replace the code with one that sends the admin's cookie to an external server.
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 storage service (MinIO) was left open so anyone could upload files to it without logging in. Because the site served those files directly, an uploaded SVG image could run JavaScript in a visitor's browser. The authors then replaced the admin panel's own script file, so when an admin loaded the panel, the attacker's code ran and could steal the admin's login cookie.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.