Memory corruption during out-of-memory (OOM) handling
PHP abandons a request when a memory allocation fails, and cleanup then uses partially initialized internal data.
Two critical flaws in the PHP engine itself (CVE-2026-109618 and CVE-2026-109619) let an unauthenticated attacker run commands on your server. They affect every PHP application, however clean its own code, and exploitation has already begun. Patches shipped on 21 October 2026.
“php2shell” is the name given to two critical vulnerabilities disclosed together in the PHP engine in October 2026. The problem is not in your application code — it is in PHP itself, which handles the request before your code runs. Application-level authentication does not protect you, and a site stays exposed even if its code is perfectly clean.
Both flaws come from memory-management errors during request handling. A remote, unauthenticated attacker can abuse them to reach command execution on the server (RCE) or to leak memory contents.
PHP abandons a request when a memory allocation fails, and cleanup then uses partially initialized internal data.
State left over from one request still points to freed memory, which a later request on the same worker reads.
The flaws are in the PHP engine, so every runtime is in scope: PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed. Any platform running PHP — including Magento, WooCommerce, Shopware and WordPress — is affected until it is updated.
Fixed in 8.5.12
Fixed in 8.4.27
Fixed in 8.3.36
Fixed in 8.2.35
End of life — no official fix (minimal source backports for 7.4 / 8.0 / 8.1)
The attacker needs no account or privilege — reaching the site is enough.
Affects every PHP application regardless of its own code quality or framework.
Exploitation has been observed, both CVEs are on the CISA KEV list, and public proof-of-concept tooling exists.
Server takeover, or disclosure of secrets and data from memory such as keys and sessions.
The decisive fix is to update now. If you cannot, apply the interim measures, then update as soon as possible.
Find the PHP version and runtime on every server:
php -v php-fpm -v # if you use PHP-FPM
Upgrade to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or newer) through your package manager, then restart all workers.
# example (Debian / Ubuntu) sudo apt update && sudo apt upgrade php8.3 sudo systemctl restart php8.3-fpm
Disable session upload progress, and on PHP 8.5 disable fatal-error backtraces, then restart all workers:
; php.ini session.upload_progress.enabled = 0 fatal_error_backtraces = 0 ; PHP 8.5 only
PHP 8.1 and older will not receive an official fix; plan an upgrade to a supported branch.
Run PHP with least privilege, enable a web application firewall (WAF) with virtual patching, and watch workers and logs for repeated crashes or anomalous behaviour.
We quickly determine whether your systems are exposed to php2shell — across your servers, applications and environments — and give you a clear report of what to patch and in what order, then re-test to confirm the gap is closed.