Skip to content
RCE Write-up Advanced

Breaking Open the Forgotten Vault

The PythonScript policy in Apigee accepted JavaScript resource URLs and executed them without the sandbox restrictions applied by the dedicated JavaScript policy, allowing access to the Java runtime. An attacker with the ability to deploy a proxy could achieve remote code execution, read Cassandra data such as OAuth tokens and KVMs, and modify platform libraries.

bugs.exposed

Published on bugs.exposed

Comment

The author, on bugs.exposed

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

An attacker could execute arbitrary code in the Apigee runtime, access Cassandra data including OAuth tokens and KVMs, and modify platform libraries to alter request handling for all APIs on the instance.

What the attacker needed

Ability to deploy an Apigee proxy

The fix

Google patched the vulnerability by removing JavaScript references from PythonScript policies and tightening the sandbox restrictions.

How it was found

  1. Create a PythonScript policy with a resource URL that uses a JavaScript scheme.
  2. Reference a JavaScript file that requests the Java runtime.
  3. Deploy the proxy and trigger the policy with a request.
  4. Observe that the script executes and gains access to Java classes.

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 system for managing APIs, and it lets you run small scripts as part of handling requests. Normally, JavaScript scripts are run in a restricted 'sandbox' that stops them from touching the underlying Java system. Here, a different policy meant for Python scripts also accepted JavaScript files but forgot to apply those restrictions, so a script could reach powerful Java features and run commands on the server.

What is RCE?

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

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.