

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Managing Secrets
incomplete
2: Injecting Secrets at Runtime
incomplete
3: Protecting Secrets
incomplete
4: Build Artifacts and Deployment Hygiene
incomplete
5: Limiting Build Context
incomplete
6: Source Code and Config Leaks
incomplete
7: Public File Leaks
incomplete
8: Server-Side Request Forgery
incomplete
9: Defending Against SSRF
incomplete
10: Open Redirects
incomplete
11: Risks of Dependencies
incomplete
12: Auditing Dependencies
incomplete
13: Dependency Maintenance
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Servers can often reach systems that a visitor's browser can't: loopback interfaces, private networks, and cloud infrastructure endpoints. Server-side request forgery (SSRF) happens when an attacker tricks a server into sending a request that borrows that privileged network position.
Click to play video
Imagine a travel app whose image-preview tool accepts a URL and fetches it directly:
response, err := http.Get(imageURL)
The feature is supposed to preview a public hotel image, but the input is really an unrestricted request destination. An attacker can use the tool to make the server fetch its own /health endpoint, probe a private admin service, or contact a cloud metadata address. The preview might then return sensitive information that was never reachable from the attacker's network.
SSRF can also do damage even when the response is hidden or ignored. A forged request can scan internal ports or trigger state-changing actions on a service that trusts the local network. Maybe the attacker isn't trying to read the response, just get your server to take your database offline or delete a file.
Whenever a feature accepts a URL or slug for a server-side request, ask: