Server-Side Request Forgery (SSRF) Explained: From Detection to Exploitation
September 24, 2026

Server-Side Request Forgery (SSRF) Explained: From Detection to Exploitation

A URL parameter that looks harmless — avatar_url, webhook, feed, next — can quietly turn into a key to your target's internal network. Server-side request forgery (SSRF) happens when an application fetches a resource for you and lets you choose where it goes. Nothing crashes. No alert fires. The server simply makes a request you control, from a spot inside the perimeter where you were never meant to stand. That is why SSRF keeps landing in high-severity bounty reports: the bug is small, the blast radius rarely is.

How SSRF Happens in Real Code

The pattern is always the same: user-supplied input reaches an HTTP client, a file loader, or an XML parser without a strict destination check. What changes is the sink.

Watch for features that fetch by nature — webhook test buttons, "import from URL" uploaders, link previews and open-graph unfurlers, RSS and sitemap readers, PDF or screenshot renderers, SSO metadata fetchers, image resizers that accept remote sources, and integrations that pull data from third-party endpoints. Then there are the indirect ones: XML parsers vulnerable to external entities, template engines, and anything that processes a URL inside an archive or document you uploaded.

The distinction that matters during triage is that SSRF is broader than a normal web request. If you can change the scheme, you leave HTTP behind entirely and step into file, gopher, dict, or ftp — which is where the interesting exploitation usually starts.

The Three Flavours You Will Actually Meet

In-band (classic)

The application returns the fetched body to you. You point it at an internal service and read the answer in the response. Fast, obvious, and increasingly rare — but when it exists, it is the easiest path to internal discovery.

Blind

Nothing comes back. You only know the request happened because your external listener received a DNS lookup or an HTTP hit. Blind SSRF is still valuable: it proves the server can be steered, and it can often be escalated through timing or side effects.

Semi-blind

You see fragments — an error message, a stack trace, a response length that changes with the target port, or a delay that betrays an open service. This is the most common real-world case and the one where patient testing pays off.

Payloads and Bypasses That Beat Naive Filters

Most defenses are blocklists and quick regexes. A short list of variants gets past a surprising number of them:

  • Loopback and localhost: 127.0.0.1, localhost, 127.1, 0.0.0.0, [::1].
  • Alternate encodings: decimal 2130706433, octal 0177.0.0.1, hex 0x7f000001, IPv4-mapped IPv6 [::ffff:127.0.0.1].
  • DNS tricks: 127.0.0.1.nip.io or sslip.io, and short-TTL records you repoint mid-flow to pull off DNS rebinding.
  • Parser confusion: https://trusted.example.com@127.0.0.1/ — the validator and the HTTP client disagree about where the host ends.
  • Redirects: host a page on your server that returns a 302 to an internal address. Many validators only check the first hop.
  • Header injection: CRLF in the URL to smuggle headers when the sink forwards them.
  • Other schemes: file://, gopher://, dict:// — still alive in older Java, PHP, and Python stacks.
  • Metadata addresses: 169.254.169.254 for AWS, Azure, GCP and DigitalOcean, 100.100.100.200 for Alibaba Cloud.

Combine them. A filter that strips localhost but not decimal notation, a WAF that blocks 169.254.169.254 but not an open redirect, or an allowlist that resolves hostnames once and connects later — all of these fall to layered tricks rather than a single clever string.

A Detection Workflow That Scales

  1. Inventory the sinks. Grep your proxy history for parameters containing url, uri, path, host, src, dest, redirect, feed, callback, and target. Then test the features that obviously fetch.
  2. Baseline behaviour. Record normal response length, status, and timing for each parameter before you break anything.
  3. Confirm the server fetches. Point the parameter at a Collaborator or interactsh host. A DNS hit is enough to prove blind SSRF.
  4. Probe internal space. Try loopback first, then 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and the metadata address.
  5. Read the side channels. Where output is hidden, use response time and length differences to fingerprint open ports — 22, 80, 443, 3306, 6379, 9200.
  6. Escalate gradually. Metadata first, then internal admin interfaces. Stop once you have enough proof.
  7. Log everything. Keep requests minimal and note timestamps, parameters, and responses for the report.

From Callback to Cloud Credentials: Escalation in Practice

A callback alone is a low-severity finding on many programs. Credentials are a different story. The 2019 Capital One breach remains the case study most hunters know: a misconfigured web application firewall was abused to reach the AWS instance metadata service and retrieve credentials tied to an S3 bucket.

On AWS, an unauthenticated GET to the metadata path under /latest/meta-data/iam/security-credentials/ can return temporary keys when IMDSv1 is still enabled. Azure and GCP require a specific header with the metadata request, so they are only reachable when your sink can inject headers — which is exactly why CRLF and gopher tricks matter.

Internal services are just as rewarding. A reachable Redis on 6379 can be driven through a gopher payload of URL-encoded protocol commands to write files or load modules. The Docker daemon on 2375, an unauthenticated Kubernetes kubelet on 10250, Elasticsearch on 9200, Consul on 8500, Jenkins, and Spring Boot actuator endpoints are all classic escalation targets. Any of those, plus a way to write a file, is often a route to remote code execution.

If you find SSRF in a program with no cloud infrastructure, look sideways instead: internal dashboards, Grafana, Kibana, Prometheus, and internal APIs that trust anything originating from inside the network. Network trust is the vulnerability.

Prove the chain, then stop. Extracting credentials to demonstrate account takeover is not required — and on most programs, it will get your report closed rather than paid.

Reporting Well and Hunting On

Write the report as a story with three parts: how the input reaches the fetch, what you proved you could reach, and what that reach means for the business. Screenshots of a metadata response with keys half-redacted land better than a wall of payloads. Include the exact parameter, the request, the timestamp, and a minimal reproduction. Suggest the fix too: an allowlist of outbound destinations, resolve-then-validate-then-connect logic, blocking non-HTTP schemes, disabling redirects, enforcing IMDSv2, and segmenting egress traffic at the network layer.

Then keep hunting. SSRF hides in features added six months after launch, in integrations nobody reviewed, and in previews that developers assume are harmless. Stay inside scope, keep your probing light, and check the program's rules before you touch internal services. A clean, well-evidenced SSRF report is one of the few that can go from a single URL parameter to a critical rating — and that is worth the patience it takes to find one.

Photo: 12019 / Pixabay

Previous Post

Bug Bounty During the Holidays: How to Keep Hunting When Everyone's Off

Next Post

From Zero to P1: A Writeup of a Critical Authentication Bypass

Related Posts

About Us

Bug Hunter Journal

Bug Bounty

Notes from the front lines of bug hunting.

Read More

Latest Post

Understanding CVSS Scoring: How to Rate Your Bugs Like a Pro
Transitioning from IT Security to Full-Time Bug Bounty: A Realistic Roadmap
How to Automate Your Recon with Subfinder, httpx, and Nuclei
From Zero to P1: A Writeup of a Critical Authentication Bypass

Notes from the front lines of bug hunting.