Filter bypass to Reflected XSS on finance.yahoo.com (mobile version)
A reflected cross-site scripting flaw existed on the mobile version of a Yahoo Finance quote page, where text from the URL path was echoed into the page. A filter uppercased the payload and blocked the alert keyword, but HTML character encoding let the attacker run script in the victim's browser.
Today I‘ll share with you a interesting XSS in Yahoo. My favorite target is Yahoo, because they have a big scope, so let’s start.
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 URL path was reflected into the page without proper output encoding, and the only defence was a filter that uppercased input and blocked the literal word alert, which HTML character references bypassed.
Impact
An attacker could run script in a victim's browser on the Yahoo Finance domain, though the report shows only a proof-of-concept alert and no real-world harm.
What the attacker needed
Victim opens a crafted link; mobile version of the site
How it was found
- Open the mobile version of the finance quote page.
- Put a crafted value in the quote path of the URL.
- Observe that the value is reflected in the page source.
- Notice the payload is uppercased and the alert keyword fails.
- Encode the alert letters as HTML character references and resend.
- The script runs in the browser.
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.
Cross-site scripting (XSS) is when a website puts text from a visitor back into its own page without cleaning it, so an attacker can slip in code that the browser runs. Here the site echoed part of the web address into the page, and a filter tried to stop it by turning letters into capitals. The attacker got around that by writing the letters as numeric character codes, which the browser turns back into normal letters.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.