XSS worm : a creative use of web application vulnerability
An XSS vulnerability in the webmail's attachment filename handling allowed an attacker to inject JavaScript that executes when an email is opened. The researcher demonstrated that this could be turned into a self-replicating worm that spreads by sending emails to contacts, though the proof-of-concept required significant user interaction.
Published on blog.compass-security.com
In my free time, I like to do some bug bounty hunting. For some reasons, I’ve been doing this almost exclusively for Swisscom.
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 attachment filename was not properly escaped when included in the JSON response and later inserted into the DOM without further sanitisation.
Impact
An attacker could execute arbitrary JavaScript in a victim's webmail session, potentially reading contacts and sending emails to spread the worm, though the proof-of-concept required multiple user confirmations.
What the attacker needed
Victim opens a malicious email; victim interacts with popups
The fix
The vulnerability was fixed and verified by Swisscom.
How it was found
- Send an email with an attachment whose filename contains HTML special characters.
- Open the email in the webmail; the filename is included in the page without escaping, triggering the XSS.
- The injected script can then access the user's contacts and send emails to spread the worm.
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.
This report describes a cross-site scripting (XSS) bug in a webmail service. XSS lets an attacker run their own JavaScript code in a victim's browser when the victim views a malicious email. Here, the filename of an attachment was not properly cleaned, so opening the email could run the attacker's code, which could then send itself to the victim's contacts.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.