Stored Cross-Site Scripting (XSS) via Arbitrary File Upload
The GLOBE platform accepted uploaded HTML files containing JavaScript and served them as text/html from the globe.gov domain. An attacker could upload a malicious file and share a trusted .gov link that runs arbitrary JavaScript in a victim's browser.
Originally disclosed on Bugcrowd
- Accepted in 2 days
- Fixed in 4 months
- Disclosed after 4 months
Summary by anthonyjsaab
A Stored Cross-Site Scripting (XSS) vulnerability was identified in the GLOBE platform due to improper validation of uploaded files.
The application allows users to upload HTML files containing JavaScript, which are then served with a text/html content type. When accessed, these files execute within the context of the globe.gov domain.
This issue could allow an attacker to craft a malicious file and share a trusted .gov link that executes arbitrary JavaScript in victims’ browsers.
The vulnerability highlights the importance of strict file type validation and secure content handling when implementing file upload functionality.
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 upload feature did not validate file types strictly and served user-supplied HTML with a text/html content type, so the browser treated it as an active page.
Impact
An attacker could craft a malicious file and share a trusted .gov link that executes arbitrary JavaScript in victims' browsers.
What the attacker needed
Ability to upload files; victim opens the shared link
The fix
The upload feature should strictly validate file types and serve user content with a safe content type or from a separate domain.
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 let people upload files, and it did not check that the files were safe. Someone could upload a web page that contains a small program (JavaScript) and then send its link to other people. Because the link belonged to the real government website, victims would trust it, and the program would run in their browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.