GHSL-2023-074: Server-Side Request Forgery (SSRF) in miniorange-saml-sp-plugin - CVE-2023-32991, CVE-2023-32992
The miniorange-saml-sp-plugin for Jenkins has a server-side request forgery (SSRF) vulnerability in the doValidateMetadataUrl method, which takes a user-supplied metadataUrl and makes a server-side request to it without validation. An unauthenticated attacker can send a crafted request to make the Jenkins server request arbitrary hosts.
Originally disclosed on GitHub Security Lab
A Server-Side Request Forgery (SSRF) vulnerability was found in the miniorange-saml-sp-plugin. The vulnerability resides in the org.miniorange.saml.MoSAMLAddIdp#doValidateMetadataUrl method and can be exploited without authentication.
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 doValidateMetadataUrl method passes the user-supplied metadataUrl directly to a request-sending function without validating or restricting the destination.
Impact
An attacker could make the Jenkins server send requests to arbitrary hosts, potentially reaching internal services.
What the attacker needed
No authentication required
The fix
The vulnerability was fixed in SAML Single Sign On(SSO) Plugin 2.1.0.
How it was found
- Send a request to the Jenkins endpoint for the plugin's validateMetadataUrl with a metadataUrl parameter pointing to an attacker-controlled host.
- The server makes a request to that URL, confirming the SSRF.
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 fetch a URL you provide to check SAML metadata. Because it does not check where that URL points, an attacker can make the Jenkins server send requests to any address, including internal systems. This is called server-side request forgery (SSRF): the server is tricked into making requests on the attacker's behalf.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.