XSSing Google employees: blind XSS on googleplex.com
The invoice submission portal allowed changing the uploaded file's type from PDF to HTML, so an attacker could upload an HTML file containing JavaScript. When a Google employee viewed the invoice, the script executed on an internal googleplex.com domain, potentially giving access to invoices and other internal tools.
websecblog.com
Published on websecblog.com
Google is an enormous company and it's dependent on thousands of suppliers to keep it running. And since it needs some way to keep track and pay their suppliers, it offers a public online tool where suppliers upload their invoices to Google.
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 server trusted the client-supplied file type and did not validate or sanitise the uploaded content, so an HTML file was served and rendered as a web page.
Impact
The attacker could execute JavaScript on an internal googleplex.com subdomain used for invoices, potentially accessing invoices and other sensitive information, but Google later clarified that access to one googleplex.com app does not give access to other apps on that domain.
What the attacker needed
Access to the invoice submission portal; ability to intercept HTTP requests; victim (Google employee) opens the uploaded file
The fix
The vulnerability was fixed by serving uploaded files from a sandboxed domain (storage.googleapis.com) so that any script runs in an isolated context.
How it was found
- Open the invoice submission portal and enter a random purchase order number.
- Select an organisation and submit to reach the invoice form.
- Upload any PDF file and intercept the upload request with a proxy.
- Change the filename to .html, the Content-Type to text/html, and the body to an XSS payload.
- Submit the invoice form.
- Wait for a blind XSS notification from the googleplex.com domain.
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.
A website let people upload invoices as PDF files, but it only checked the file type in the browser, not on the server. An attacker could trick the upload into accepting an HTML file with a script inside. When a Google employee opened that file, the script ran in their browser and could read or change things on the internal site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.