Skip to content
RCE Write-up Intermediate

4 Google Cloud Shell bugs explained – bug #3

The report describes a vulnerability in Google Cloud Shell's Git clone feature that allowed an attacker to execute code in a victim's Cloud Shell environment. An attacker could exploit this to gain unauthorised access to the victim's cloud resources.

[email protected] Follow

Published on offensi.com

In #Bug 1 of this series of articles we discussed the possibility of appending the ‘cloudshellgitrepo’ GET-repo to the Cloud Shell URL in order to clone a Github or Bitbucket repository. Aside from this parameter we can also specify a ‘cloudshellgitbranch’ and ‘cloudshellworkingdir’ parameter to aid in the cloning…

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 Git clone feature in Cloud Shell did not properly sanitise repository content, allowing malicious code to be executed when a user cloned a crafted repository.

Impact

An attacker could execute arbitrary code in a victim's Cloud Shell session, potentially leading to full compromise of the victim's Google Cloud account.

What the attacker needed

Victim uses Cloud Shell; victim clones a malicious repository

The fix

The vulnerability was fixed by Google.

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.

Google Cloud Shell is a free online terminal for managing cloud resources. This bug meant that when a user cloned a malicious Git repository, the attacker could run commands inside the user's Cloud Shell, potentially taking control of their cloud account. It was fixed by Google.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by [email protected]

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.