Skip to content
XSS Write-up Intermediate

Drag Drop XSS in Google ;)

The Google Docs drawing module failed to properly validate HTML content when a user drags and drops a file, allowing an attacker to execute arbitrary JavaScript. An attacker could craft a malicious HTML file that, when dragged into the drawing module, triggers the XSS payload.

yappare Follow

Published on blog.yappare.com

The original lives on blog.yappare.com

We do not hold its text, 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 drawing module did not sanitise or validate the HTML content of dragged files, allowing script execution when an image failed to load.

Impact

An attacker could execute arbitrary JavaScript in the context of Google Docs, potentially compromising the victim's account or data.

What the attacker needed

Victim drags a malicious HTML file into Google Docs drawing

The fix

The drawing module should properly validate and sanitise dragged HTML content to prevent script execution.

How it was found

  1. Create a simple HTML file containing an XSS payload.
  2. Drag and drop the HTML file into the Google Docs drawing module.
  3. The XSS payload executes.

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 a cross-site scripting (XSS) bug in Google Docs. XSS lets an attacker run their own JavaScript code in a victim's browser when the victim interacts with a malicious file. Here, dragging a specially crafted HTML file into the drawing tool caused the code to run.

What is XSS?

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

More by yappare

View all

14 more disclosed reports, best first.

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.