Server-side request forgery (SSRF)
PortSwigger Web Security Academy · Practitioner
- #SSRF

Blind SSRF with Out-of-Band Detection
The vulnerability
The analytics software opens the URL in the Referer header, but you don’t see the response. If you put a Burp Collaborator address there, you see the request arrive.
Fix: Don’t open URLs from a header. If you have to, only allow known addresses.
The lab
This site uses analytics software which fetches the URL specified in the Referer header when a product page is loaded.
To solve the lab, use this functionality to cause an HTTP request to the public Burp Collaborator server.
Note
To prevent the Academy platform being used to attack third parties, our firewall blocks interactions between the labs and arbitrary external systems. To solve the lab, you must use Burp Collaborator’s default public server.
Solution
1. Install Burp Extension “Collaborator Everywhere”: Use the Burp Suite BApp Store to install the “Collaborator Everywhere” extension.
2. Browse the Website: Navigate through the website’s pages. The “Collaborator Everywhere” extension automatically replaces the Referer header with a Collaborator payload.
3. Check for OOB Interaction: The extension will notify you of any callbacks it receives. This indicates that the server made an HTTP request to the Collaborator domain specified in the Referer header, confirming the blind SSRF and the lab is solved.

SSRF with Blacklist-Based Input Filter
The vulnerability
The application blocks 127.0.0.1, localhost and /admin. But 127.1 is the same address, and the path filter can be tricked as well.
Fix: Use a list of allowed addresses. You will always miss something in a list of forbidden ones.
The lab
This lab has a stock check feature which fetches data from an internal system.
To solve the lab, change the stock check URL to access the admin interface at
http://localhost/adminand delete the user carlos.The developer has deployed two weak anti-SSRF defenses that you will need to bypass.
Solution
1. Intercept the Stock Check Request: On a product detail page, click “Check stock.” In Burp Suite’s Proxy → HTTP history, find the POST /product/stock request and Send to Repeater.
2. Bypass IP Blacklist: In Repeater, try to access http://127.0.0.1. A 400 Bad Request confirms the IP is blocked. Change the stockApi URL to an obfuscated representation of the same IP address, such as http://127.1. Send the request. An HTTP/2 200 OK response confirms the bypass.
3. Bypass Path Filter: Now, try to access the admin panel with the URL http://127.1/admin. The 400 Bad Request indicates that /admin is also blocked. Use case manipulation to bypass this filter. Change the path to /AdMiN (e.g., http://127.1/AdMiN). An HTTP/2 200 OK response confirms access to the admin panel.
4. Delete the Target User: Change the stockApi URL to http://127.1/AdMiN/delete?username=carlos. Send the request. An HTTP/2 302 Found response indicates that the user carlos has been deleted, and the lab is solved.
SSRF with Filter Bypass via Open Redirection Vulnerability
The vulnerability
The stock check only opens URLs on the shop itself. The shop has an open redirect, so you use that to get to the internal admin page.
Fix: Don’t follow redirects automatically, and fix the open redirect.
The lab
This lab has a stock check feature which fetches data from an internal system.
To solve the lab, change the stock check URL to access the admin interface at
http://192.168.0.12:8080/adminand delete the user carlos.The stock checker has been restricted to only access the local application, so you will need to find an open redirect affecting the application first.
Solution
1. Test SSRF and Identify Filter: On a product page, click “Check stock.” In Burp Suite’s Proxy → HTTP history, find the POST /product/stock request and send it to Repeater. Change the stockApi URL to the target http://192.168.0.12:8080/admin. A 400 Bad Request confirms the filter blocks external URLs.
2. Find an Open Redirect Vulnerability: On the product detail page, notice a “Next product” link with a path parameter (e.g., /product/nextProduct?path=...). Test this parameter by setting it to an external URL. If the application redirects you, it's vulnerable to open redirection.
3. Chain Vulnerabilities to Access Admin Panel: Go back to Repeater and change the stockApi URL to use the open redirect vulnerability to access the internal back-end system. The payload will be stockApi=/product/nextProduct?path=http://192.168.0.12:8080/admin. Send the request. An HTTP/2 200 OK response confirms access to the admin panel.
4. Delete the Target User: Change the stockApi URL to stockApi=/product/nextProduct?path=http://192.168.0.12:8080/admin/delete?username=carlos. Send the request. An HTTP/2 200 OK response confirms that the user carlos has been deleted, and the lab is solved.