GHSL-2023-093: Server-Side Request Forgery (SSRF) in jenkinsci/maven-artifact-choicelistprovider-plugin - CVE-2023-40347
The ArtifactoryChoiceListProvider#doTest method in the Jenkins plugin takes a user-supplied URL and credentials ID, loads the credentials with system-level access, and sends them to the specified URL. An authenticated attacker could leak arbitrary credentials to a server they control.
Originally disclosed on GitHub Security Lab
Several Server-Side Request Forgery (SSRF) vulnerabilities in jenkinsci/maven-artifact-choicelistprovider-plugin allow the leak of sensitive credentials to an attacker-controlled server. The issue arises from a lack of proper input validation/sanitization of the url parameter in the…
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 method uses the user-supplied URL without validation and retrieves credentials with ACL.SYSTEM, bypassing normal permission checks.
Impact
An authenticated attacker could leak arbitrary credentials they do not otherwise have access to.
What the attacker needed
Authenticated Jenkins user
How it was found
- Authenticate to Jenkins.
- Send a POST request to the plugin's test endpoint with a credentialsId parameter naming the secret to leak and a url parameter pointing to an attacker-controlled server.
- The server loads the credential and sends it in an Authorization header to the specified URL.
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 plugin lets Jenkins users test connections to artifact servers. It takes a web address from the user and also looks up a stored password by name. Because it does not check where the address points, someone logged in can make Jenkins send any stored password to a server they control.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.