GHSL-2023-069: Server-Side Request Forgery (SSRF) in jenkinsci/elasticbox-plugin - CVE-2023-37964, CVE-2023-37965
The Jenkins elasticbox plugin fails to validate the endpointUrl parameter in several web methods, allowing an attacker to direct the plugin to send stored credentials to an attacker-controlled server. An attacker could also use a redirect to leak responses from internal servers.
Originally disclosed on GitHub Security Lab
A Server-Side Request Forgery (SSRF) vulnerability in jenkinsci/elasticbox-plugin allows the leak of sensitive credentials to an attacker-controlled server. The issue arises from a lack of proper input validation/sanitization of the endpointUrl parameter in multiple web methods such as…
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The plugin does not validate or restrict the endpointUrl parameter, and it reads credentials with system-level permissions regardless of the user's privileges.
Impact
This vulnerability can lead to sensitive secret credentials leak and access to the internal network servers.
What the attacker needed
Victim clicks a link; attacker controls a server
How it was found
- Send a request to the Jenkins endpoint with the desired credentialsId and an endpointUrl pointing to an attacker-controlled server.
- The plugin reads the specified credentials and sends them to the attacker's server.
- The attacker's server responds, and the plugin makes a second request including the response in a header.
- The attacker can respond with a redirect to an internal server to leak its 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.
This is a server-side request forgery (SSRF) bug. The plugin takes a URL from the user and makes a request to it without checking if it's safe. An attacker can give their own server's address and trick the plugin into sending secret passwords or tokens to that server.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.