DOM-based XSS on Microsoft.com
A search page on Microsoft's MSRC blog reflected the query parameter into the page, allowing HTML injection and then script execution. An attacker could craft a URL that runs JavaScript in a victim's browser on the microsoft.com origin.
Published on medium.com
Welcome back to my Medium blog! I’m excited to see you here and can’t wait to share more inspiring content with you.
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 query parameter was reflected into the page without correct output encoding, and the site relied on a WAF rather than safe encoding to stop script execution.
What the attacker needed
Victim opens a crafted link; no account needed
The fix
The issue was fixed after MSRC confirmed it, according to the disclosure timeline.
How it was found
- Search for a term in the blog search bar and observe it reflected on the page.
- Try HTML injection payloads and see a broken image, confirming HTML injection.
- Try script payloads through the search bar, which the WAF blocks.
- Put the payload directly into the URL fragment instead, which bypasses the filter and executes script.
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.
A reflected cross-site scripting (XSS) bug means the site takes something from the URL and puts it into the page without proper cleaning. Here the search term was echoed back, so a crafted link could make the browser run attacker-supplied JavaScript as if it came from Microsoft. The victim only has to open the link.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.