Escaping the iframe via exceptions
A user could throw an object with an html property from within a program iframe, causing the error display to treat that data as HTML and run arbitrary JavaScript. An attacker could use this to modify a victim's profile, such as their bio.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 3 days
- Disclosed after 22 days
Summary by the program
Several variations on an XSS in the CS platform, involving throwing a malformed error that caused the error buddy to interpret user-provided data as HTML. We now make sure to sanitize all of the messages passed from the iframe before using them.
The report
You can throw an object with an html property to run arbitrary js
Here is an example program that modifies a user's profile. I made the program as private as possible by saving it with nouser and drawing nothing in the hopes that it will be ignored, but if you want me to delete it, I will. The program will change your bio, so if you don't want that to happen, log out first.
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 error-handling code inserted messages from the iframe into the page as HTML without sanitising them first.
Impact
An attacker could run JavaScript in the context of the main site and modify a victim's profile, for example their bio.
What the attacker needed
Victim runs or views the crafted program; victim is logged in
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.
Websites often run user-made programs inside a sandboxed frame (an iframe) so they cannot affect the main page. Here, when a program threw an error, the site displayed the error message as HTML instead of plain text, so a crafted error could run code in the main site. That let an attacker change things on the victim's account, like their profile bio.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.