Skip to content
RCE Advisory Advanced CVE-2021-32834

GHSL-2021-063: Arbitrary code execution in Eclipse Keti - CVE-2021-32834

Eclipse Keti allowed users who could create Policy Sets to submit Groovy expressions that were evaluated without adequate sandboxing, enabling arbitrary code execution. An attacker could escape the Groovy sandbox using meta-programming and run commands on the server.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

A user able to create Policy Sets can run arbitrary code by sending malicious Groovy scripts which will escape the configured Groovy sandbox.

pwntester, on GitHub Security Lab

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The Groovy sandbox relied on an AST transformation customizer that did not inspect annotations, allowing the @ASTTest annotation to execute arbitrary code during compilation.

Impact

This could lead to post-authentication remote code execution, allowing an attacker with the ability to create Policy Sets to run arbitrary commands on the server.

What the attacker needed

Authenticated user with permission to create Policy Sets

How it was found

  1. Send a PUT request to the policy-set endpoint with a JSON body containing a policy condition that uses the @ASTTest annotation to execute a command.
  2. The server parses the condition as a Groovy script, and the annotation triggers code execution during compilation.

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 report has not been written yet. The Original tab links to the source.

Eclipse Keti is a system that lets administrators define access rules using a scripting language called Groovy. The problem was that the system ran these scripts without properly restricting what they could do, so someone with permission to create rules could make the server run any command they wanted. This is dangerous because it gives an attacker full control over 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.

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

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.