Skip to content
XSS Write-up Intermediate

XSS vulnerability in Google Cloud Shell’s code editor through mini-browser endpoint

The mini-browser endpoint of Google Cloud Shell's code editor served user-uploaded HTML files without a sandbox, so a malicious HTML file could execute script when opened directly. An attacker could use an 'Open in Cloud Shell' link and a crafted markdown file to trick a user into visiting the endpoint, leading to command execution on the user's Cloud Shell VM.

Psi Follow

Published on ψ.fun

Google Cloud Shell is a product of the Google Cloud Platform (GCP) that provides a number of interesting features, such as an interactive shell environment and an integrated code editor, with the intent of making experimenting and administration of GCP products easier while requiring very little setup.

Psi, on ψ.fun

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

Impact

A successful exploit could allow an attacker to execute arbitrary commands on the assigned user's virtual machine and obtain access to the user's GCP resources.

What the attacker needed

Victim clicks an 'Open in Cloud Shell' link; victim clicks a link in the editor; victim provides their email address; attacker knows victim's username

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 code editor in Google Cloud Shell could show HTML files from a user's environment. If a user opened a malicious HTML file directly in a new browser tab, the script inside it ran with the editor's permissions. This could let an attacker run commands on the user's Cloud Shell machine.

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 Psi

View all

3 more disclosed reports, best first.

More from Google

View all

The newest disclosed reports for this program.

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.