Exploit database

GH-4d7d0ab7ddd05c46351ff9e6e01613ce

namest504/php2shell-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-109618

412 sources

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

Repository files12
namest504/php2shell-pocRevision c776f58ddd79

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

cve-lab/test_compare.sh

Shell · 2,447 bytes
#!/bin/bash
# Side-by-side comparison of pre-fix vs post-fix OOM handling.
#
# Usage:
#   ./test_compare.sh                 # uses ports 8084 (pre-fix) and 8086 (post-fix)
#   ./test_compare.sh 8084 8086       # explicit ports

set -euo pipefail

PREFIX_PORT=${1:-8084}
POSTFIX_PORT=${2:-8086}

echo "==============================================="
echo "  CVE-2026-109618 pre-fix vs post-fix comparison"
echo "==============================================="
echo ""
echo "Pre-fix:  http://127.0.0.1:${PREFIX_PORT}"
echo "Post-fix: http://127.0.0.1:${POSTFIX_PORT}"
echo ""

for label_port in "PRE-FIX(8.4.4):${PREFIX_PORT}" "POST-FIX(8.4.27):${POSTFIX_PORT}"; do
    LABEL="${label_port%%:*}"
    PORT="${label_port##*:}"

    echo "--- $LABEL ---"

    # Check reachability
    VER=$(curl -sf "http://127.0.0.1:${PORT}/debug.php" 2>/dev/null || echo "NOT REACHABLE")
    if [ "$VER" = "NOT REACHABLE" ]; then
        echo "  SKIP: lab at port $PORT is not running"
        echo ""
        continue
    fi
    echo "  $VER" | head -2

    # Run the comparison script
    echo "  OOM trigger output:"
    RESP=$(curl -s "http://127.0.0.1:${PORT}/cve_compare.php" 2>&1)
    echo "$RESP" | sed 's/^/    /'
    echo ""

    # Check worker survival
    PID_AFTER=$(curl -s "http://127.0.0.1:${PORT}/debug.php" 2>/dev/null | grep PID | awk '{print $2}' || echo "dead")
    echo "  Worker PID after OOM: $PID_AFTER"

    # Repeated OOM stress
    echo "  Repeated OOM (5x):"
    for i in $(seq 1 5); do
        HTTP=$(curl -s -o /dev/null -w '%{http_code}' "http://127.0.0.1:${PORT}/cve109618.php" 2>&1 || echo "000")
        echo "    attempt $i: HTTP $HTTP"
    done
    PID_FINAL=$(curl -s "http://127.0.0.1:${PORT}/debug.php" 2>/dev/null | grep PID | awk '{print $2}' || echo "dead")
    echo "  Worker PID after 5x OOM: $PID_FINAL"
    echo ""
done

echo "==============================================="
echo "  Summary"
echo "==============================================="
echo ""
echo "Pre-fix (CVE-2026-109618):"
echo "  - OOM triggers longjmp bailout"
echo "  - Shutdown functions run in potentially corrupted Zend engine state"
echo "  - FPM worker survives with stale internal state (CVE-2026-109619)"
echo ""
echo "Post-fix:"
echo "  - OOM sets delayed_oom state (PENDING)"
echo "  - VM interrupt stops execution gracefully"
echo "  - Shutdown functions run after clean error handling"
echo "  - No state corruption, no stale pointers"