SSRF
Last updated
Was this helpful?
Last updated
Was this helpful?
This can expose internal services or data, lead to unauthorized access, or even enable attacks such as scanning internal networks or accessing sensitive information.
Validate and sanitize user inputs, restrict outbound requests, use network segmentation to limit access to internal services, and apply strict whitelisting for allowed URLs or IPs.
We are searching for request that have:
Include full URLs in the POST
body or parameters
Include full or partial URL paths in the POST
body or parameters
Headers that include URLs, such as Referer
Allow for user input that may result in a server retrieving resources
To test SSRF we can use Burp's Collaborator or free alternatives, such as:
Automated tools can be use to check for SSRF, such as .
The /admin
directory is restricted to normal users and is accessible only to administrator
and if someone request it from localhost
(Figure 1).
The Check Stock
functionality makes a call to an external resource (Figure 2).
The stockApi
parameter is vulnerable to SSRF and can be leverage to perform administrative operations (Figure 3).
The payload might need to be encoded for the SSRF to work (Figure 6).
The below example is based on PortSwigger's module.
The below example is based on the application.
The below example is based on HTB's module.
The below example is based on HTB's module.