GHSL-2023-065: Server-Side Request Forgery (SSRF) in jenkinsci/mabl-integration-plugin - CVE-2023-37952, CVE-2023-37953
The mabl Jenkins plugin's form-filling endpoints read a credential by ID and send it to an attacker-controlled URL supplied in the request. An unauthenticated attacker could leak arbitrary stored secrets, and because the endpoints accept GET, a victim could be tricked into triggering the leak.
Originally disclosed on GitHub Security Lab
Several Server-Side Request Forgery (SSRF) vulnerabilities in jenkinsci/mabl-integration-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 apiBaseUrl parameter in the MablStepBuilder#doFillEnvironmentIdItems…
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 uses the `apiBaseUrl` request parameter as the destination for an outbound request that carries a credential loaded with `ACL.SYSTEM`, without validating the URL or checking the caller's permission.
Impact
Sensitive secret credentials could be leaked to an attacker-controlled server; the text notes the attacker does not need to be authenticated, though anonymous users may need Overall/Read if role-based authorization is enabled, and a GET request means a victim could be tricked into triggering it.
What the attacker needed
Network access to Jenkins; Overall/Read if role-based auth is on; a known credential ID
The fix
The issue was fixed in mabl Plugin 0.0.47.
How it was found
- Send a request to the plugin's `fillEnvironmentIdItems` endpoint with a chosen credential ID and an attacker-controlled base URL.
- The plugin loads the credential with system-level permissions.
- The plugin sends the credential to the attacker's server in an Authorization header.
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 has web addresses that Jenkins uses to fill in dropdowns on a form. Those addresses take a credential ID and a server address from the request, then fetch the credential and send it to that server. An attacker can choose any credential ID and their own server, so the secret is delivered straight to them.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.