Skip to content
RCE Write-up Intermediate

Google VRP – Sandboxed RCE as root on Apigee API proxies

A user could replace the code of a hosted Node.js target in an Apigee API proxy with code that runs shell commands, and the deployed proxy executed those commands as root. The author demonstrated reading the system password file, but Google stated the executed code was correctly sandboxed.

Omar Espino Follow

Published on omespino.com

3.- select hosted target: – put any name (in this case “rce”) – select “Quick start” radio button and the “Next” button – then “Next” again, and “Next” one more time – – check “prod” checkbox and clic “Create and Deploy” Button – after the deploy, copy the url and clic on “Edit proxy”

Omar Espino, on omespino.com

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 hosted target runtime allowed user-supplied Node.js code to call child_process.exec without sufficient isolation, so commands ran with root privileges inside the sandbox.

Impact

An authenticated user could run arbitrary commands as root inside the Apigee sandbox, though Google stated the code was correctly sandboxed.

What the attacker needed

An Apigee account

How it was found

  1. Log in to apigee.com and create a new API proxy with a hosted target using the Quick start option.
  2. Deploy the proxy to the prod environment and open the proxy for editing.
  3. In the Develop tab, replace the content of the index.js file under Resources > hosted with code that calls exec.
  4. Save the file and visit the deployed proxy URL to see the command output.

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.

Apigee is a service for managing APIs. A user can upload small programs that run on the service. The researcher showed that such a program could run operating-system commands, which is normally not allowed. Google replied that the code was kept in a sandbox, a restricted environment.

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 Omar Espino

View all

4 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.

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.