How I Found an Unauthorized RCE Bug in an Amazon EC2 Instance Us
An exposed Jenkins script console on an Amazon EC2 instance allowed unauthenticated execution of Groovy code, which the author used to read system files. The asset belonged to an AWS customer rather than Amazon, so the report was closed without a bounty.
Published on medium.com
In this write-up, I’ll share my journey of discovering an Unauthorized Remote Code Execution (RCE) vulnerability in an Amazon EC2 instance, which led to sensitive information disclosure. While the report was ultimately marked ineligible for a bounty due to the asset belonging to an AWS customer and not Amazon’s…
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 Jenkins script console was exposed to the internet without authentication or network restrictions.
What the attacker needed
Internet access to the host; no authentication on the console
How it was found
- Search for the given IP address on Censys.
- Open the Jenkins script console URL on that host.
- Run a Groovy command to read a system file and confirm code execution.
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.
A Jenkins server has a feature called the script console that lets administrators run code on the server. If that page is reachable without logging in, anyone can run commands and read files. Here the author found such a page on a cloud server and used it to read a system file.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.