Behind the Message: Two Critical XSS Vulnerabilities in Zoho’s
Two PostMessage handlers in Zoho scripts lacked origin validation and passed attacker-controlled data into DOM sinks, allowing arbitrary JavaScript execution. An attacker could send crafted messages from another site to execute script in the context of almost all Zoho applications.
Published on infosecwriteups.com
PostMessage misconfigurations can create significant security vulnerabilities in web applications, and a recent discovery in Zoho products highlights just how widespread the impact can be. This article details two Cross-Site Scripting (XSS) vulnerabilities stemming from flawed PostMessage implementations.
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 missing origin validation on PostMessage listeners combined with unsanitised input inserted into HTML attributes or iframe src.
Impact
An attacker could execute arbitrary JavaScript in the context of almost all Zoho applications, potentially compromising user accounts and data.
What the attacker needed
Victim visits attacker's site; attacker can send postMessage to Zoho window
The fix
The vulnerabilities were fixed by Zoho after being reported.
How it was found
- Open a Zoho application in a new window.
- Send a crafted postMessage to the window with a start_call action and a malicious calleeId.
- The calleeId is inserted into an onerror attribute, executing the injected JavaScript.
- For the second vulnerability, send a postMessage with source 'micsinproduct' and type 'banner' containing a malicious iframeSrc.
- The iframeSrc is set as the iframe src, executing the javascript: URL.
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.
PostMessage is a way for websites to send messages to each other. These Zoho scripts listened for such messages but never checked who sent them, and they put the message contents into the page without cleaning them. So any website could send a message that made Zoho run the attacker's JavaScript.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.