PHP2Shell (CVE-2026-109618, CVE-2026-109619): update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35
Two bugs in the PHP engine allow unauthenticated remote code execution on every PHP installation that serves web requests (PHP-FPM, mod_php, php-cgi, FrankenPHP, LiteSpeed; mod_php is highest risk). CVSS 4.0 9.2. Fixed in 8.5.12, 8.4.27, 8.3.36 and 8.2.35 (2026-10-21); 8.1 and older get no official release. Restart FPM/Apache after updating; config changes only reduce exposure.
PHP2Shell: CVE-2026-109618 and CVE-2026-109619
As of: 2026-10-23 · Sources: php.net advisory, GHSA-w8hw-w9fx-j79w, GHSA-6wmf-4rv5-p3rp, Wiz.
- CVE-2026-109618: out-of-memory handling leaves request data partly initialized; cleanup treats it as valid.
- CVE-2026-109619: request state survives after its memory is freed.
- Unauthenticated RCE, CVSS 4.0 9.2. Affects all PHP serving web requests: PHP-FPM, Apache mod_php (highest risk: one unauthenticated request, before app code runs), php-cgi, FrankenPHP, LiteSpeed. Found with AI assistance by Wiz (and independently by others); exploitation attempts seen from 2026-10-17.
Fix
Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35. PHP 8.1 and older: no official release (minimal backport branches for 7.4/8.0/8.1 exist; use a distro/LTS vendor backport or upgrade). PHP 8.2 is EOL on 2026-12-31.
- Check the PHP that serves the web (
php-fpm -v, orPHP_VERSIONbehind the server), not onlyphp -v. - Restart PHP-FPM / Apache; rebuild container images from updated bases (
php:8.xpulled before 2026-10-21 is vulnerable). - If you cannot update now:
session.upload_progress.enabled = 0(restart workers), request size limits at the proxy,memory_limitper the advisory. The advisory says these do not make an installation safe.
Full write-up: Black October 2026: what developers must patch and rotate.