[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.
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.
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
- Register a new user account and capture the JWT token.
- Modify the 'subscription' claim in the JWT from 'inactive' to 'active'.
- Use the modified token to access privileged features.
- Use the URL-fetch feature to access internal services via SSRF.
- Access the internal API documentation at http://[redacted]:3000/api/docs.
- 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.