Skip to content
RCE Write-up Advanced

[Rabbit Store] — JWT Manipulation, SSRF, SSTI Leading to RCE and Root Access via a Vulnerable Erlang Distribution on RabbitMQ

The application trusted a client-supplied JWT claim to grant privileged features, and its URL-fetch feature allowed SSRF to internal services. An internal chatbot endpoint was vulnerable to SSTI, leading to RCE, and the exposed Erlang distribution service allowed root access via cookie theft.

Bash Overflow Follow

Published on osintteam.blog

Erlang-based systems rely on a background service called the Erlang Port Mapper Daemon (EPMD) to coordinate communication between distributed nodes. It listens on port 4369 and acts as a directory, telling clients which Erlang node is running on which port.

Bash Overflow, on osintteam.blog

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 gain remote code execution as the web user, then escalate to root by exploiting the Erlang distribution service.

What the attacker needed

A free account; victim clicks a link (for SSRF); access to internal network

How it was found

  1. Register a new user account and capture the JWT token.
  2. Modify the 'subscription' claim in the JWT from 'inactive' to 'active'.
  3. Use the modified token to access privileged features.
  4. Use the URL-fetch feature to access internal services via SSRF.
  5. Access the internal API documentation at http://[redacted]:3000/api/docs.
  6. Exploit SSTI in the 'username' parameter of the chatbot endpoint to execute commands.

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.

The app let users change a value in their login token to unlock paid features. It also had a feature that fetched images from URLs, which could be tricked into accessing internal servers. One internal page ran user input as code, giving attackers a remote shell, and the exposed Erlang service allowed full server takeover.

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 Bash Overflow

View all

35 more disclosed reports, best first.

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.