Skip to content
RCE Write-up Beginner

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.

Swarooppatil Follow

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…

Swarooppatil, on medium.com

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

  1. Search for the given IP address on Censys.
  2. Open the Jenkins script console URL on that host.
  3. 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.

More by Swarooppatil

View all

1 more disclosed report, 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.