perfSONAR
perfSONAR's pScheduler accepted the file: scheme in the url parameter of http tests, allowing arbitrary local file reads, and also used the Host header to make outbound requests, enabling SSRF. An attacker could read files and scan internal networks.
Published on zxsecurity.co.nz
During a recent engagement, Daniel Nemeth found multiple security vulnerabilities in perfSONAR (up to v4.4.5), such as a Server-Side Request Forgery (SSRF) and a file read vulnerability, which could be used for user enumeration. This post outlines the technical details of these vulnerabilities.
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
Root cause
Likely the http test type did not restrict the URL scheme to http/https, and the Host header was used to construct outbound requests without validation.
Impact
An attacker could read arbitrary local files (subject to the parse string) and use the SSRF to scan internal networks and reach internal services.
What the attacker needed
Access to pScheduler API; ability to create tasks
The fix
The vulnerabilities were fixed in version 4.4.6.
How it was found
- Send a JSON task to the pScheduler API with test type http and url set to file:/etc/passwd and parse set to root.
- Observe the test result showing that the string root was found in /etc/passwd.
- Send a task creation request with a modified Host header pointing to an external collaborator server.
- Observe the collaborator server receiving a request from the pScheduler server.
- Use different error messages (connection refused vs TLS handshake error) to determine open and closed ports on internal hosts.
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.
perfSONAR is a tool for measuring network performance. Its scheduler could be tricked into reading local files on the server and into making requests to other servers chosen by the attacker. This let an attacker see if files exist and probe internal networks.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.