Skip to content
XSS Disclosed report Intermediate

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.

fanar Follow

Originally disclosed on HackerOne

Medium 5.7 View original
  • 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.

The original report as published on HackerOne, by fanar. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Go to the design edit page at manage.booth.pm/design/edit.
  2. Upload a file as a header image while manipulating the Content-Type header to include text/html.
  3. The server accepts the file and serves it with an effective text/html content type.
  4. 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.

More from pixiv

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.