Skip to content
RCE Write-up Beginner

Story of my Biggest Bounty ever : Command Execution on Jenkin

A publicly accessible Jenkins instance allowed self-registration, and the new account had permission to install plugins. The attacker installed a plugin that provides a terminal, which allowed OS command execution on the server.

Jay Jani Follow

Published on medium.com

Bounty$8,000 View original

Today I wanna talk about one of my recent finding on HackerOne’s private program. It was a simple RCE on publicly accessible Jenkin.

Jay Jani, 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 instance allowed public self-registration and granted new users the ability to install plugins, which can lead to command execution.

What the attacker needed

Publicly accessible Jenkins instance; self-registration enabled; new account can install plugins

The fix

The Jenkins instance should be secured by disabling public self-registration and restricting plugin installation to administrators.

How it was found

  1. Find a publicly accessible Jenkins instance.
  2. Register a new account and activate it.
  3. Check if the script console is available and authenticated.
  4. Use the 'Manage Jenkins' option to install the Terminal plugin.
  5. Use the installed plugin to execute OS 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.

Jenkins is a tool that automates software builds. Normally only trusted administrators should be able to add plugins or run commands on it. Here, anyone could create an account and then add a plugin that let them run commands on the server, which is very dangerous.

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 Jay Jani

View all

5 more disclosed reports, 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.