Skip to content
RCE Advisory Intermediate CVE-2021-38294

GHSL-2021-085: Command injection in Apache Storm Nimbus - CVE-2021-38294

The getTopologyHistory service in Apache Storm Nimbus concatenates a user-supplied username into a shell command without sanitisation, allowing an unauthenticated attacker to execute arbitrary system commands. This leads to pre-authentication remote code execution.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

A Command Injection vulnerability exists in the getTopologyHistory service of the Apache Storm Nimbus server allowing pre-auth Remote Code Execution (RCE)

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 username parameter is passed unsanitised into a shell command string, allowing shell metacharacters to inject additional commands.

Impact

This issue may lead to pre-auth RCE.

What the attacker needed

Network access to Nimbus Thrift port 6627; No authentication required

The fix

The vulnerability was fixed in Apache Storm versions 2.3.0, 2.2.1, 2.1.1, and 1.2.4 by properly sanitising the username before passing it to the shell command.

How it was found

  1. Connect to the Nimbus Thrift server on port 6627 without authentication.
  2. Call the getTopologyHistory method with a crafted username containing shell metacharacters and commands.
  3. The server executes the injected commands as part of the shell invocation.

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.

Apache Storm is a system for processing large streams of data. Its main server, Nimbus, accepts requests from other programs. The server took a username from the request and pasted it directly into a command that the operating system runs. Because the username was not cleaned, an attacker could add extra commands that the server would then run, giving them control of the machine.

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.