Skip to content
XSS Write-up Intermediate

Yahoo Mail stored XSS #2

A stored cross-site scripting (XSS) vulnerability in Yahoo Mail allowed an attacker to execute arbitrary JavaScript in a victim's browser when the victim viewed a specially crafted email. The attacker could then read the victim's inbox and send the contents to an external server.

klikki Follow

Published on klikki.fi

A security vulnerability in Yahoo Mail was fixed last week. The flaw allowed an attacker to read a victim’s email or create a virus infecting Yahoo Mail accounts, among other things.

klikki, on klikki.fi

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 built HTML by concatenating a user-controlled attribute value into a string and then inserted it via innerHTML without encoding, allowing HTML injection.

Impact

The attacker could read the victim's inbox contents and send them to an external server, and a self-propagating virus payload would also have worked.

What the attacker needed

Victim uses Yahoo Mail; victim opens the malicious email; no further interaction required

How it was found

  1. Compose an email with a link-enhancer card containing a data-url attribute.
  2. Include a quote symbol in the data-url value to break out of the attribute.
  3. Send the email to the victim.
  4. The victim opens the email in Yahoo Mail.
  5. The link-enhancing JavaScript uses the data-url value to render a share button, executing the injected 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.

This is a stored XSS bug. When a victim opened an email, malicious JavaScript hidden in an HTML attribute ran in their browser because the site inserted it into the page without proper encoding. That let the attacker read the victim's emails and send them elsewhere.

What is XSS?

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

More by klikki

View all

6 more disclosed reports, best first.

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.