From image Upload to Workspace Takeover: Deconstructing a Critica
A low-privilege user uploaded a file with a misleading extension but an HTML content type, which the platform served from the main application domain. When an administrator opened the file's link, embedded JavaScript ran in the admin's session and used API calls to promote the attacker to admin.
Published on infosecwriteups.com
A seemingly harmless feature — file uploading — became the entry point for a complete workspace takeover in a recent vulnerability found in the Dust platform. This case serves as a critical reminder of how a classic Stored Cross-Site Scripting (XSS) flaw, when combined with architectural oversights, can lead to…
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 application trusted the user-supplied content type and served uploaded files from the main application origin without forcing download or sandboxing.
Impact
The attacker could escalate their privileges to admin, remove legitimate administrators, and access or delete sensitive workspace data.
What the attacker needed
A low-privilege account; victim clicks a link; victim is an administrator
The fix
The report recommends serving user content from a separate cookie-less domain, forcing attachment disposition, validating file contents server-side, and applying a strict CSP.
How it was found
- Log in as a low-privilege member and upload a file with an innocuous image name.
- Manipulate the request to set the file's content type to HTML.
- Share the direct URL of the uploaded file with a workspace administrator.
- The administrator visits the link, and the browser executes the embedded JavaScript in the application's origin.
- The script uses the administrator's session to call APIs that promote the attacker's account to admin.
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 user uploaded a file that looked like an image but was actually a web page containing harmful code. Because the site served that file from the same address as the main application, the code could act as the logged-in administrator and change their permissions.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.