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.
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”
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
- Log in to apigee.com and create a new API proxy with a hosted target using the Quick start option.
- Deploy the proxy to the prod environment and open the proxy for editing.
- In the Develop tab, replace the content of the index.js file under Resources > hosted with code that calls exec.
- 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.