Theme Assets uploader allows HTML content
The theme asset uploader accepted HTML files, which should not have been allowed because HTML can carry JavaScript, undermining the restriction of JavaScript to the blog network.
Originally disclosed on HackerOne
- Triaged in 10 hours
- Fixed in 45 hours
- Paid in 7 days
- Disclosed after 7 days
Summary by the program
The reporter submitted a report highlighting that specially formatted yet valid HTML files were able to be uploaded as theme assets. Even though we allow for JavaScript on our blog network, we don't allow HTML files to be uploaded here so that we can restrict JavaScript execution to the blog network. Our fix involved whitelisting the specific files & mimetypes that are able to be uploaded as theme assets.
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 uploader validated files by content or extension too loosely instead of enforcing a strict allowlist of permitted file types and MIME types.
Impact
An attacker could upload an HTML file as a theme asset, bypassing the restriction that JavaScript execution be confined to the blog network.
What the attacker needed
Ability to upload theme assets
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.
A website lets users upload theme files but blocks HTML because HTML can contain code that runs in a browser. The check was too loose, so a specially made HTML file got through, which the site wanted to prevent.
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.