How I hacked a Jenkins endpoint and leaked critical information
A Jenkins credentials store endpoint was accessible without proper authorisation, exposing an active access token, an SSH username and its private key. An attacker could use these to gain shell access to the server or compromise the deployment pipeline.
Published on mohammadibnibrahim.medium.com
In this writeup, I will demonstrate how a specific misconfiguration in a certain technology used by the application led to the exposure of critical sensitive information on a web application.
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 a misconfiguration where the Jenkins credentials store endpoint did not inherit the correct permission checks, leaving it accessible without authentication.
Impact
The exposed SSH keys and access tokens could allow an attacker to gain shell access to the server or compromise the deployment pipeline.
What the attacker needed
None
How it was found
- Run a directory brute-force scan against the target domain.
- Notice the /jenkins directory and open it to see a Jenkins login page.
- Enumerate endpoints under /jenkins; most return 403 Forbidden.
- Research Jenkins-specific exploitation techniques.
- Visit the credentials store path under /jenkins.
- Observe a 200 OK response showing an access token, SSH username and private key.
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 building and deploying software. It stores passwords and keys in a 'credentials store', which should only be visible to logged-in administrators. Here, a particular page in that store could be opened by anyone, so secrets were shown to the public.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.