GHSL-2023-068: Server-Side Request Forgery (SSRF) in jenkinsci/datadog-plugin - CVE-2023-37944
The Datadog plugin's test connection endpoint reads arbitrary credentials with system-level permissions and sends them to a user-supplied URL. An authenticated attacker without admin rights could leak any stored credential to a server they control.
Originally disclosed on GitHub Security Lab
A Server-Side Request Forgery (SSRF) vulnerability in jenkinsci/datadog-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 targetApiURL parameter in the DatadogGlobalConfiguration#doTestConnection.
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 did not validate the targetApiURL parameter and used system-level permissions to read any credential, then sent it to that URL.
Impact
An authenticated attacker without admin privileges could leak any stored credential to a server they control.
What the attacker needed
Authenticated user; no admin privileges required
The fix
The vulnerability was fixed in Datadog Plugin 5.4.2.
How it was found
- Send a POST request to the testConnection endpoint with parameters specifying the credential ID and an attacker-controlled URL.
- The plugin reads the credential with system permissions.
- The plugin sends the credential to the attacker's server.
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.
A server-side request forgery (SSRF) happens when a server is tricked into making a request to a location the attacker chooses. Here, the plugin took a web address from the user and sent a stored secret to that address, so an attacker could steal passwords or API keys.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.