Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

SSRF · Web Security

Direct answer

SSRF (server-side request forgery) tricks a web server into making requests to internal services or cloud metadata, such as 169.254.169.254. Validate and allow-list URLs and block internal addresses at the network.

When to use this

Use this when a server fetches URLs and could be misused.

First 30 seconds

1. SSRF makes servers request attacker-chosen URLs (internal services, cloud metadata).

2. Allowlist destinations.

3. Block internal ranges and metadata IPs.

4. IMDSv2/hop limits.

5. Network egress controls.

Operational verification

user URL → validation/allowlist → outbound request

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Security architecture and operations
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformSecurity architecture and operations
Scope / prerequisiteUse this when a server fetches URLs and could be misused.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Metadata services (169.254.169.254) reachable from the app.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Block internal ranges and metadata IPs.
  • Allow-list destinations.
  • Add network egress controls.
Key checks
  • Outbound request allowlist — destinations
  • curl -s 'https://<app>/fetch?url=http://169.254.169.254/' — SSRF test (authorised)
  • IMDSv2 required (AWS) — metadata protection
ReferenceWhy it matters1 section · depth on demand

Defences

  • Validate destination URLs against an allowlist of hosts and schemes.
  • Resolve DNS and block private, loopback, link-local (169.254.169.254) and IPv6 equivalents; re-validate after redirects.
  • Fetch from an isolated network segment with egress filtering.
  • Use IMDSv2 on AWS and equivalent protections on other clouds.
  • Do not return raw responses from fetched URLs to the user.
ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Server-Side Request Forgery (SSRF) makes a server send requests to destinations chosen by the attacker — typically internal services or cloud metadata endpoints that are not reachable from outside. Features that fetch URLs (webhooks, previews, imports) are common entry points.

Defences:

ControlPurpose
Allow-list destinationsOnly fetch from approved hosts
Resolve and validate IPsBlock private, loopback, link-local and metadata addresses, re-check after redirects
Disable unneeded URL schemesOnly http/https
IMDSv2 / metadata protectionsCloud metadata requires tokens
Egress filteringServers cannot reach arbitrary internal hosts

Network segmentation limits what an SSRF can reach even when application controls fail.

Common SSRF targets

TargetWhy
169.254.169.254Cloud metadata — credentials (use IMDSv2 on AWS)
localhost / 127.0.0.1Admin interfaces
Internal IP rangesDatabases, internal APIs
file://, gopher://Local files, raw protocols

Bypass tricks include DNS names resolving to internal IPs, decimal IPs (2130706433), IPv6 ([::1]) and redirects — validate the resolved IP at connection time.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docSecurity architecture and operations current

Authoritative/upstream documentation reviewed for bounded claims in Web Security → SSRF. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://owasp.org/www-project-application-security-verification-standard/ · confidence 94%
Confirmation

Confirm action

Continue?