Skip to content
XSS Write-up Intermediate

Yahoo Login Protection Seal – Stored CSS Injection

The Yahoo login protection seal feature allowed users to set a custom colour, which was inserted unsanitised into a CSS style block. An attacker could inject arbitrary CSS rules, and in very old browsers such as IE6, execute JavaScript.

Brett Buerhaus Follow

Published on buer.haus

In 2014 I discovered a vulnerability on Yahoo's Login Protection seal that allowed for CSS injection. This information was saved to the browser and IP, persisting across login sessions on that computer.

Brett Buerhaus (@bbuerhaus), on buer.haus

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

The colour value from the user was inserted into a CSS style block without sufficient escaping, allowing CSS rule injection.

Impact

An attacker could inject CSS to alter the login page's appearance, and on IE6 could execute JavaScript; modern browsers limited the impact to CSS injection only.

What the attacker needed

A Yahoo account; victim uses the same computer or IP; victim uses IE6 for script execution

The fix

The feature was deprecated and removed, which the report treats as a fix.

How it was found

  1. Set a protection seal colour to a value containing CSS syntax to break out of the intended rule.
  2. Observe that the injected CSS changes the page background.
  3. Attempt to escape the style tag to inject HTML and script, which failed due to escaping.
  4. On IE6, use a CSS expression payload to execute JavaScript.

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 protection seal is a personalised image shown on a login page so you know the page is genuine. The colour chosen for the seal was placed directly into the page's styling code without proper cleaning. This let an attacker add their own styling rules, and on very old browsers even run JavaScript.

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 Brett Buerhaus

View all

8 more disclosed reports, best first.

More from Yahoo! / Verizon Media

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.