RCE/LFI on test Jenkins instance due to improper authentication flow
A test Jenkins instance allowed login with any valid Google account, and once logged in, the attacker could execute arbitrary code via the Jenkins Script Console. The instance had no access to source code or resources.
Originally disclosed on HackerOne
- Disclosed after 10 days
Summary by the program
@nahamsec found a test Jenkins instance where they could login with any valid Google account.
Once logged in, they gained the ability to execute arbitrary code via the Jenkins Script Console. This was a test jenkins instance with no access to source code or resources.
Summary by the researcher
###Methodology Here is the Methodology used to find this bug: https://www.hackerone.com/blog/how-to-recon-and-content-discovery
###Possible blog post? If I get a chance, I may release all details on in a dedicated blogpost.
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 authentication flow was misconfigured to accept any Google account without verifying that the user was authorised for the Jenkins instance.
Impact
An attacker could execute arbitrary code on the test Jenkins instance, but the instance had no access to source code or resources, limiting the impact.
What the attacker needed
A valid Google account; access to the test Jenkins instance
How it was found
- Find a test Jenkins instance.
- Log in using any valid Google account.
- Access the Jenkins Script Console.
- Execute arbitrary code.
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.
A test Jenkins server let anyone with a Google account log in. After logging in, the attacker could use a built-in feature to run their own code on the server.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.