SSRF in Open Distro for Elasticsearch
The Open Distro for Elasticsearch alerting module allowed privileged users to create webhook triggers that sent HTTP requests to arbitrary destinations without validation. An attacker could use this to scan internal networks, access cloud metadata and Kubernetes APIs, and potentially chain with other vulnerabilities to achieve remote code execution.
rotem-bar.com
Published on rotem-bar.com
·May 11, 2021·
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker with privileged access could enumerate internal services, access cloud metadata and Kubernetes APIs, and potentially chain with other vulnerabilities to achieve remote code execution; severity depends on network isolation and access controls.
What the attacker needed
Privileged user account; access to alerting module; network reachability to internal resources
The fix
The vulnerability was fixed in version 1.13.1.0 by adding a destination host deny list and allow list configuration to restrict outbound requests.
How it was found
- Create a trigger in the alerting module with a webhook to a chosen resource.
- Test the trigger, which sends the request to the specified server and returns the response.
- Use script magic to edit a trigger, invoke it, and read the results.
- Scan the network and access internal resources such as the metadata API and Kubernetes API.
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 write-up has not been written yet. The Original tab links to the source.
Server-Side Request Forgery (SSRF) is when an attacker tricks a server into making requests to internal systems on their behalf. Here, the alerting feature let users set a webhook URL, and the server would fetch it without checking where it pointed, so an attacker could reach internal services they normally couldn't access.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.