iOS Outlook Stored XSS Write-Up($3000)
An HTML email containing an image tag with an error handler executed as script when opened in the Microsoft Outlook client on iOS, and the same issue appeared to affect Office 365. An attacker could send a crafted email that runs script in the recipient's mail client.
Staying home is really nightmare for me and I am so boring to learn new things. So, I decided to write a writeup about how I found stored XSS in Micorsoft outook and got some bounty $3000.
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 Outlook mail client rendered HTML email bodies without properly sanitising or encoding the markup, so an image tag's error handler ran as script.
Impact
Script could run inside the victim's Outlook mail client when they opened the crafted email, and the same issue appeared to affect Office 365.
What the attacker needed
Victim opens the crafted email; attacker can send raw HTML email
The fix
The bug was fixed according to the author, who was then awarded a bounty.
How it was found
- Send an HTML email containing an image tag with an error handler to an Outlook address using a custom PHP mailer script.
- Open the received email in the Outlook client.
- Observe the script executing in the mail client.
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.
Cross-site scripting, or XSS, is when text that should be shown as harmless content is instead treated as code by an app, so it runs. Here the email body was meant to be displayed as HTML, but a small piece of markup was not cleaned up, so the mail app ran it as script. The researcher sent the email from a custom script rather than a normal mail app, because the normal app cleaned the content before sending.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.