Skip to content
XSS Write-up Beginner

Stored XSS on techprofile Microsoft

A stored cross-site scripting vulnerability existed on the Microsoft Tech Profile editing page, where user-supplied input was not correctly filtered before being stored. An attacker could inject malicious JavaScript that would execute in the context of other users viewing the profile, potentially stealing cookies.

Mohammad Ali Syarief Follow

Published on medium.com

Stored XSS occurs when a web application gathers input from a user which might be malicious, and then stores that input in a data store for later use. The input that is stored is not correctly filtered.

Mohammad Ali Syarief, on medium.com

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 application stored user-supplied profile input without properly sanitising or encoding it before rendering it to other users.

Impact

Users can execute arbitrary JavaScript code in the context of other users, which is critical when targeted users have high privileges; attackers could grant themselves administrator privileges and even take over ownership of the New Relic account.

What the attacker needed

A Microsoft Tech Profile account; victim views attacker's profile

The fix

The vulnerability was fixed by ensuring that dynamic content from the data store cannot be used to inject JavaScript on a page.

How it was found

  1. The attacker edits their profile on the Tech Profile site.
  2. The attacker sets an XSS payload in the profile.
  3. A victim views the attacker's profile.
  4. The victim's cookie is sent to the attacker's server.

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.

Stored cross-site scripting (XSS) is a type of security flaw where a website saves harmful code that a user types in, and later shows it to other visitors without cleaning it first. This lets an attacker run their own JavaScript in other people's browsers, which can steal their login cookies or do things on their behalf.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.