Skip to content
RCE Advisory Intermediate

GHSL-2021-064: Arbitrary code execution in Netflix NdBench

NdBench exposes an unauthenticated endpoint that evaluates Groovy scripts without sandboxing, allowing arbitrary code execution. An attacker can host a malicious page that sends a POST request to the local NdBench server, compromising the developer's machine.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

An attacker may get arbitrary code execution on NDBench servers by providing arbitrary Groovy scripts.

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

Impact

This issue may lead to Remote Code Execution, compromising any developer running NdBench who visits a malicious site.

What the attacker needed

NdBench server running on localhost; Victim visits attacker-controlled page

The fix

The issue was fixed in commit [redacted].

How it was found

  1. The attacker creates a malicious Groovy script that executes arbitrary code.
  2. The attacker hosts a web page that sends a POST request with the script to the NdBench endpoint on localhost.
  3. A developer running NdBench visits the malicious page.
  4. The browser sends the request to the local NdBench server, which executes the script.

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.

NdBench is a tool for testing databases. It has a feature that lets users run Groovy scripts, but it does not check who is sending the script or limit what the script can do. This means anyone who can reach the NdBench server can run any command on the machine, for example by tricking a developer into visiting a malicious website.

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.