Remote Code Execution via a Base64-Encoded Payload — No Login Needed
A login endpoint accepted a base64-encoded JSON object supplied in a URL parameter and trusted the role it contained, so an unauthenticated attacker could become an administrator. From that admin access, an internal export script passed a request parameter into a shell command, letting the attacker run commands as root and read local files.
Published on medium.com
Today, I want to share a fascinating story of how I discovered a Remote Code Execution (RCE) vulnerability on a live target. This report walks through every step — from initial recon to full system compromise — showing how patience and methodical testing can lead to critical discoverie
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
Root cause
Likely the login handler decoded a client-supplied parameter and used the role inside it for authorisation without verifying it, and the export script later passed a request parameter into a shell command unescaped.
Impact
An unauthenticated attacker could become an administrator and then execute commands as root on the host, reading local files and fully compromising the device.
What the attacker needed
Network access to the exposed host; no account needed
How it was found
- Enumerate subdomains and search Shodan for hosts under the target domain.
- Open one of the returned addresses and reach a login panel.
- Send a base64-encoded JSON object describing an administrator in the authorised parameter of the login request.
- Follow the redirect and arrive logged in as administrator.
- Browse the internal feature pages and find the export endpoint under the php/features path.
- Pass a shell command through the action parameter of the export endpoint and read the output, then list files and read a local password file.
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.
Some web applications put a small block of data into the address bar, encoded so it survives the trip, and then trust whatever comes back. Here the application believed a role value the visitor supplied, so anyone could claim to be an administrator without a password. Once inside, a file-export page ran whatever text was placed in one of its parameters as an operating-system command, which is how the attacker reached the machine itself.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.