XSS Stored On Messages In [ Outlook Web — Outlook Android App ]
Outlook's web and Android clients failed to properly sanitise HTML content in received email messages. An attacker could send a crafted message containing a link tag that imports an external file with script content, or an SVG with an onload handler, and have it execute in the victim's browser or app.
Published on elmahdi.tistory.com
Hello Everyone this is my first write up and in this writeup i will share with you my findings in Outlook
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 message sanitiser allowed a link tag with a rel=import attribute, and the Android client applied no HTML filtering at all.
Impact
An attacker could run script in the victim's Outlook session, which could let them act on the victim's mailbox.
What the attacker needed
Attacker-controlled web server; victim opens the crafted email; Outlook web or Android app
The fix
The first bug was fixed by Microsoft, but the same class of issue remained in the Android app.
How it was found
- Host a file on the attacker's own web server containing script content.
- Send an email with the text/html content type that includes a link tag pointing at that file.
- Open the message in Outlook on the web, where the imported file runs in the browser.
- After the first bug was fixed, send a message with an SVG onload handler to the Android app.
- Open the message in the Outlook Android app, where the HTML is rendered without filtering.
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.
Email can contain formatting instructions called HTML, and programs that display email must clean these up so they cannot run code. Here, Outlook did not clean them properly, so a sender could include something that runs a small program in the reader's email client. That program could then act as the victim inside their mailbox.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.