Zoho Account Takeover: How a Single Click Can Lead to Full Contro
A DOM XSS in a Zoho subdomain allowed script execution via the URL hash, and a postMessage misconfiguration on another Zoho site let an attacker load arbitrary scripts. Chaining these with a CORS misconfiguration and OTP interception, an attacker could take over a victim's Zoho account.
Published on infosecwriteups.com
Hello, in this story, I will discuss how I discovered DOM XSS and Postmessage misconfiguration and escalated them to take-over the Zoho account. This article will be divided into three parts:
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 root cause is unsafe handling of user-controlled input: the hash is passed to eval(), and postMessage handlers trust messages without validating their origin, allowing script injection.
Impact
An attacker could take over a victim's Zoho account by combining these vulnerabilities, but the exploit requires the victim to visit a malicious page or click a crafted link.
What the attacker needed
Victim visits a malicious page; victim is logged into Zoho; attacker can host a script
The fix
The vulnerabilities were fixed: the DOM XSS patch was deployed on February 9, 2024, and the postMessage vulnerability was patched on March 19, 2024.
How it was found
- Craft a URL with a malicious payload in the hash fragment of the Zoho Assist videos page.
- The page's JavaScript extracts the hash and passes it to eval(), executing the payload.
- For the postMessage bug, send a message to set the SERVER_DOMAIN variable to an attacker-controlled host.
- Send a second message to load a script from that domain, achieving script execution.
- Use the script execution to read emails via a CORS misconfiguration and extract the account ID.
- Initiate a login using OTP, read the OTP from the victim's email, and complete login to take over the account.
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 report describes two separate bugs: one where a website takes part of the web address (the bit after the # symbol) and runs it as code, and another where a website listens for messages from other windows and can be tricked into loading a malicious script. By combining these with a flaw that let one Zoho site read emails from another, an attacker could steal a login code sent by email and break into the account.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.