Clipboard hazard with Google Sheets
Google Sheets allows embedding documents in iframes, and when a user presses CTRL+V on an attacker's page, a malicious formula on the clipboard is evaluated by the embedded sheet. This can modify data in a read-only document or exfiltrate sheet contents to an attacker-controlled server.
This is an advisory about an interesting attack vector against Google Sheets that abuses embedded Sheets documents to exfiltrate content. Google does not consider this a security risk (“working as intended”).
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 embedded Google Sheets application in safe mode still evaluates formulas pasted via keyboard shortcuts, including import functions that fetch external resources, without additional restrictions.
Impact
An attacker could modify ranges in a document where they have only read-only access, or exfiltrate data from a document they cannot access if they know its ID; Google considers this working as intended.
What the attacker needed
Victim visits attacker page; victim presses CTRL+V; attacker knows document ID (for exfiltration)
How it was found
- The attacker creates a web page that embeds a Google Sheets document in an invisible iframe.
- The attacker places a formula on the victim's clipboard.
- The victim visits the attacker's page and presses CTRL+V.
- The embedded sheet evaluates the formula, which can modify data or exfiltrate sheet contents.
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 copy something, it goes to a temporary storage called the clipboard. Some websites can put their own content on your clipboard without you noticing. If you then paste into a Google Sheet that is secretly embedded in another page, the sheet may run a formula that sends your data to someone else. This report shows that trick.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.