PortGate

Advisories · PHP & Laravel

CVE-2026-109618 Critical CVSS 9.2 Actively exploited

PHP2Shell: remote code execution through out-of-memory corruption

Disclosed 21 Oct 2026 · Last reviewed 2 Dec 2026

Hitting PHP's memory limit at the wrong moment leaves request data half-initialized, and request cleanup then trusts it. Exploits appeared within hours of the patch and CISA confirmed attacks.

What happened

Out-of-memory handling could interrupt PHP while internal request data was only partly set up. Cleanup then treated the invalid data as valid. On Apache with mod_php the exploit runs before any application code, so a firewall in front of the app does not see it.

Affected and patched versions

Affected
PHP before 8.2.35, 8.3.0–8.3.35, 8.4.0–8.4.26 and 8.5.0–8.5.11. Researchers report the bug back to PHP 5.4. Apache with mod_php is the most exposed setup.
Patched
PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 (21 October 2026), and later releases.

How to check your server

Check

php -r 'echo PHP_VERSION, PHP_EOL;'
apache2ctl -M 2>/dev/null | grep -i php

How to fix and harden

  1. Run the version check on every host that serves PHP, including containers built from older base images.
  2. Upgrade to 8.2.35, 8.3.36, 8.4.27, 8.5.12 or later. Prefer the November releases (8.2.36, 8.3.37, 8.4.28, 8.5.13), which also fix CVE-2026-129289.
  3. Restart PHP-FPM and Apache so every worker runs the new binary.
  4. PHP 8.1 and older get no upstream release. Move to a supported version or a vendor with backports.
  5. After patching, scan web roots for files written since 21 October.

Fix

sudo apt update && sudo apt install --only-upgrade 'php8.*'
sudo systemctl restart 'php*-fpm' apache2 2>/dev/null; true

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON