Skip to content
XSS Write-up Intermediate

Google Account Takeover

The password recovery flow lacked CSRF protection and reflected a user-controlled parameter into a form action, allowing an attacker to redirect the victim to a malicious site or execute JavaScript. An attacker could combine these to perform spear-phishing or steal credentials.

orenh.com

Published on orenh.com

If I told you to think of the most sensitive features (security-wise) in a web application, you would probably say – Login. Well if your definition of “Login” does not include password recovery, then it would definitely be the second one.

The author, on orenh.com

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 failed to validate or encode the 'rpu' parameter before using it in a form action, and lacked CSRF tokens on the recovery initiation endpoint.

Impact

An attacker could conduct spear-phishing to steal credentials or execute arbitrary JavaScript in the context of Google's domain, potentially leading to account takeover.

What the attacker needed

Victim has a Google account; victim clicks a crafted link; attacker hosts a malicious site

The fix

The issue was fixed by Google within 10 days.

How it was found

  1. Start the password recovery process to obtain the encrypted cookie.
  2. Modify the 'rpu' parameter to a malicious URL or JavaScript payload.
  3. Access the final step directly using the cookie to bypass the multi-step flow.
  4. Send a crafted link to the victim that initiates recovery via CSRF and then triggers the XSS or open redirect.

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.

When you forget a password, a website often sends a reset link. This report found that Google's reset process could be tricked into sending you to a fake page or running harmful code, because it trusted a value in the web address without checking it. An attacker could use that to steal your password.

What is XSS?

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

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.