Stored XSS at Trello
Trello allowed users to upload SVG files that were opened in the browser rather than forced to download, so an SVG containing a script would execute in the context of the site. An attacker could use this to run script in a victim's session when the file was viewed.
Published on maordayanofficial.medium.com
Vulnerabilities: 1. Stored XSS — Stored XSS, also known as persistent XSS, is the more damaging of the two.
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 upload feature accepted SVG files and served them inline with a content type that lets the browser execute embedded script, instead of forcing a download or sanitising the file.
Impact
Script embedded in an uploaded SVG could run in the context of the site when the file was opened, though the report gives no detail on what an attacker could then do with a victim's session.
What the attacker needed
Ability to upload files; victim opens the uploaded SVG
The fix
The report says the issue was fixed quickly, but does not describe the fix; it should be fixed by serving uploaded SVGs as downloads or from a separate origin, or by sanitising them.
How it was found
- Upload an SVG file containing a script to the site
- Open the uploaded SVG file in the browser
- The embedded script runs in the site's context
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.
An SVG is a picture format that can also contain code. If a website shows such a file directly in the browser instead of making you download it, that code can run as if it were part of the website. This is called stored cross-site scripting, because the harmful file is saved on the site and runs when someone opens it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.