no-click password stealing via XSS on blog.mozilla.org and hacks.mozilla.org
A reflected cross-site scripting (XSS) vulnerability existed on the WordPress login page of hacks.mozilla.org and blog.mozilla.org due to insufficient input validation in the WPML plugin. An attacker could craft a URL that executes JavaScript in a victim's browser, potentially stealing autofilled passwords or adding persistent scripts to capture manually entered credentials.
Originally disclosed on Mozilla
- Fixed in 4 months
- Paid in 4 months
- Disclosed after 4 months
Our security mailbox received a report of an XSS on our blogs. It was filed against hacks, but I confirmed it works on https://blog.mozilla.org/ blogs as well. If a victim uses a password manager that autofills the password with no user interaction (like the one built-in to Firefox) then any malicious website could send the victim to this site and steal the user's password before the user could stop it.
Harder, but if a site could convince the victim that they wanted to go to our blog and log in then the XSS could add script that silently hung around until the victim manually entered or pasted their password. Since the blog posts have authors listed and we're pretty open it would be pretty easy to find potential victims to target.
I looked in the security blog (where I'm an admin) and didn't see the WPML plugin listed in the plugin section so maybe the bug is elsewhere, or maybe WPML is a "silent" plugin? I found [a redacted XSS report](https://wpml.org/forums/topic/i-found-an-exploit-with-your-plugin-with-reflected-xss/) from a couple of weeks ago, but didn't find any security patch announcements or rumors of exploits going around.
The mail:
> #### Summary:
> Due to insufficient input validation on the WPML plugin, it's possible to perform reflected cross-site scripting (XSS) attacks on any users at hacks.mozilla.org host.
>
> #### Description:
> With the following payload "?wp_lang=en_US%27%22%20id=x%20tabindex=1%20onfocusin=alert(1)%3E"
on the main WordPress login page, it will be possible to execute javascript on behalf of the users.
>
> #### Steps to reproduce:
> 1. Visit https://hacks.mozilla.org/wp-login.php?wp_lang=en_US%27%22%20id=x%20tabindex=1%20onfocusin=alert(1337)%3E%22 and an alert should pop up.
>
> #### Impact:
> Attackers are able to inject javascript codes that will be executed in the victim's browser, which might lead to account compromise.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely insufficient input validation and output encoding of the wp_lang parameter in the WPML plugin, allowing injected HTML attributes to execute script.
Impact
An attacker could execute JavaScript in a victim's browser, potentially stealing passwords autofilled by password managers or capturing manually entered credentials, though the report notes this is harder if the victim must be convinced to visit and log in.
What the attacker needed
Victim visits a crafted link; victim uses a password manager that autofills; or victim is convinced to log in
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 report has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) is a flaw where a website lets an attacker sneak their own JavaScript code into a page that other people view. Here, a specially crafted link to the login page would run the attacker's code in the victim's browser. That code could then read a password that the browser's password manager fills in automatically, or wait for the user to type it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.