IT news
PHP2Shell: two critical flaws in PHP itself
AI summary Check sources below for details.
Two flaws in the PHP engine (CVE-2026-109618 and -109619) let an attacker run code on a web server without logging in, on WordPress, Drupal and Joomla alike. Updating the website is not enough; PHP itself needs the fix.
What happened
On 21 October 2026 the PHP project released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two related critical flaws, tracked as CVE-2026-109618 and CVE-2026-109619, and nicknamed PHP2Shell by the security firm Wiz, whose researchers took part in finding them together with others. Wiz rates them up to 9.2 out of 10.
The important point: the flaws are in PHP, not in a particular website. In the demonstrations, WordPress, Drupal and Joomla sites could be taken over by an unauthenticated visitor, and Wiz says even a trivial “Hello World” script on an affected PHP is exposed. Releases going back to PHP 5.4 are affected.
The first flaw is about running out of memory. When a request makes PHP run out of memory at the wrong moment, PHP leaves its own bookkeeping in a broken state and later trips over it. With Apache’s mod_php this happens before any application code runs, and complete code execution was shown against default settings. For PHP-FPM the source analysis says it is susceptible, but no complete attack has been demonstrated. The second flaw lets data left over from one request be used in the next one.
Who is affected
Anyone who runs PHP: your own servers, a hosting package, a Docker image, a control panel such as Plesk, and the forgotten old site on the old server. Updating WordPress or another application does not help, because the flaw sits underneath it.
What to do
- Install a fixed PHP release (8.5.12, 8.4.27, 8.3.36 or 8.2.35 or later) and restart Apache, PHP-FPM and any long-running PHP workers. Without the restart the old code keeps running.
- Versions without official support do not get a release from the PHP project. Ask your hoster or distribution vendor for a patched package, or plan the move to a supported version now.
- If you cannot update today, the PHP team lists interim measures: setting
memory_limit = -1and limiting memory with the operating system instead, keeping upload and nesting limits small, and blocking multipart form requests in front of PHP if the application does not use them. These reduce the risk but are not a fix. Do not useRLIMIT_ASorRLIMIT_DATAas a substitute. - Check what you run: a list of all servers and sites with their PHP version is the first step, and many companies do not have one.
Update on 23 October
A proof of concept started circulating. It needs a specific session configuration. Until the next bugfix release, the PHP team recommends session.upload_progress.enabled = 0 in addition to updating.