Dec 29, 2025

What is SSRF? The Simple Explanation

Server-Side Request Forgery (SSRF) occurs when a web application fetches resources from URLs you control, potentially accessing internal systems it shouldn't.

Think of it this way:

You โ†’ Website โ†’ "Fetch this URL for me" โ†’ Internal AWS/Database/Admin Panel

The website acts as your proxy, making requests from its trusted internal position.

Real Healthcare Example

During testing a healthcare platform, I discovered:

Normal request: /api/image?url=https://logo.com/image.png โœ…
SSRF exploit:   /api/image?url=http://169.254.169.254/latest/meta-data/ ๐Ÿ’ฅ

The response leaked:

{
  "AccessKeyId": "ASIAX7ABC123...",
  "SecretAccessKey": "wJalrXU...",
  "Token": "..."
}

![SSRF Response Leak]( SSRF Commonly Appears

SSRF loves these endpoints:

โ€ข /image?url=
โ€ข /fetch?url=
โ€ข /webhook?url=
โ€ข /proxy?url=
โ€ข /api/render?url=

Pro Tip: Any ?url= parameter deserves SSRF testing.

Test It in 30 Seconds

curl "https://target.com/api/fetch?url=http://169.254.169.254/latest/meta-data/"

Look for: AWS metadata, internal IPs, or unusual delays โ†’ Critical vulnerability confirmed.

Why SSRF is So Dangerous

When successful, SSRF provides access to:

1. Cloud Credentials (AWS/GCP/Azure metadata) 2. Internal Admin Panels (localhost services) 3. Sensitive Databases (internal network resources) 4. Network Mapping (port scanning internals)

One SSRF = Complete infrastructure compromise.

The Vulnerable Code Pattern

// โŒ Vulnerable
app.get('/api/fetch', async (req, res) => {
  const response = await fetch(req.query.url);
  res.send(await response.text());
});
javascript
// โœ… Secure
app.get('/api/fetch', async (req, res) => {
  const url = req.query.url;
  
  // Block dangerous destinations
  const blockedIPs = ['127.0.0.1', '169.254.169.254', '10.', '192.168.'];
  if (blockedIPs.some(ip => url.includes(ip))) {
    return res.status(400).json({ error: 'Invalid URL' });
  }
  
  // Whitelist allowed domains only
  if (!url.match(/^https:\/\/(yourdomain\.com|cdn\.com)/)) {
    return res.status(400).json({ error: 'URL not allowed' });
  }
  
  const response = await fetch(url);
  res.send(await response.text());
});

Essential Security Checklist

โœ… Block private IPs: 127.0.0.1, 169.254.169.254, 10.0.0.0/8
โœ… Whitelist allowed domains only
โœ… Never trust user-supplied URLs
โœ… Disable redirect following
โœ… Validate response content

Why Companies Pay Big for SSRF

๐Ÿ’ฐ Typical bounties: $5,000 - $50,000+
๐Ÿ’ฐ Healthcare + Cloud = Critical severity
๐Ÿ’ฐ Often chains to RCE/data exposure
๐Ÿ’ฐ 5-minute discovery time

Start Hunting Today

Step 1: Run your recon โ†’ find URL parameters Step 2: Test http://169.254.169.254/latest/meta-data/ Step 3: Document + report โ†’ Get paid