php2shell: HTTP-only PHP 8.4.26 RCE bypasses ASLR on stock Apache image

cyb3rops · x · 2026-10-22

The php2shell-bypass-aslr-exp GitHub repo (779 stars) demonstrates full RCE against PHP 8.4.26 + Apache prefork + modphp under strict constraints: fully remote, HTTP only, no sessionstart() on the target page, and no PHP written to the target. The official php:8.4.26-apache image was exploited 3/3 with a single exploit.py (proof: uid=33 www-data).

The exploit relies on memory corruption vs ASLR; earlier public PoCs were lab-only and limited to a one-worker php-fpm setup, but the author shows it scales to N workers by keeping N-1 workers busy. Current version requires displayerrors=1; a pure-HTTP heap leak for displayerrors=0 already works, with full RCE to follow.

Related event: Open-source repo demonstrates HTTP-only ASLR bypass RCE in PHP 8.4.26(2 posts)→

Original post →

More from Safety

Safety channel →