Skip to content
XSS Write-up Intermediate

xss in Yahoo Mail Again, worth $10000

A DOM-based XSS vulnerability in Yahoo Mail allowed an attacker to execute JavaScript when a victim viewed a specially crafted email, enabling reading of the victim's inbox and potential self-propagating attacks. The flaw was in how the email composing view handled data-* attributes, specifically the data-url attribute, which was not properly sanitized before being inserted into the DOM.

Klikki Oy 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 concatenated user-controlled data from the data-url attribute directly into HTML without proper encoding, then inserted it via innerHTML, leading to DOM-based XSS.

Impact

An attacker could read the victim's inbox contents via AJAX and send them to an attacker-controlled server, and potentially create a self-propagating virus, as demonstrated in a proof of concept.

What the attacker needed

Victim uses Yahoo Mail; victim views the email

How it was found

  1. Compose an email with a YouTube link to generate link enhancer card markup.
  2. Inspect the raw HTML to see the data-* attributes, including data-url.
  3. Modify the data-url value to include a quote and HTML markup.
  4. Send the email to the victim.
  5. When the victim views the email, the malicious HTML is rendered and JavaScript executes.

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 cross-site scripting (XSS) bug. When you open an email, Yahoo Mail uses JavaScript to build parts of the page, like a share button. The bug meant that if an attacker put special characters in a link inside the email, Yahoo Mail would treat that as code and run it, letting the attacker read your emails or do other things as you.

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 Oy

View all

1 more disclosed report, 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.