Bypass extension check leads to stored XSS at https://s2.booth.pm
The server did not properly validate the Content-Type header during header image upload, allowing an attacker to upload an HTML file with a text/html content type. This led to stored XSS on the sandboxed domain s2.booth.pm, where arbitrary JavaScript could execute in a victim's browser.
- Triaged in 31 hours
- Fixed in 28 days
- Paid in 3 days
- Disclosed after 2 months
Summary by the program
In this report, a hacker identified a stored XSS in the header image upload function at https://manage.booth.pm/design/edit using Content-Type header manipulation.
Upon file upload, the server failed to properly validate the provided Content-Type, accepting unintended values such as Content-Type: text/html; image/png where text/html should not be included.
This allowed an attacker to upload a HTML file with text/html as the effective Content-Type, allowing for a page with arbitrary JavaScript embedded to be loaded on a victim's browser.
This resulted in a stored XSS on BOOTH's sandboxed domain s2.booth.pm.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server failed to properly validate the Content-Type header, accepting values that included text/html instead of restricting to image types.
What the attacker needed
Access to manage.booth.pm design edit; ability to manipulate Content-Type header; victim views the uploaded file
How it was found
- Go to the design edit page at manage.booth.pm/design/edit.
- Upload a file as a header image while manipulating the Content-Type header to include text/html.
- The server accepts the file and serves it with an effective text/html content type.
- The uploaded HTML with embedded JavaScript loads on the sandboxed domain s2.booth.pm, executing the script.
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 report has not been written yet. The Original tab links to the source.
When you upload a file, the server checks the file's declared type (Content-Type) to decide how to handle it. Here, the server accepted a type that included 'text/html', so the uploaded file was treated as a web page. That let an attacker run their own JavaScript when someone viewed the file, which is called stored cross-site scripting (XSS).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.