IT news

PHP2Shell: two critical flaws in PHP itself

AI summary Check sources below for details.

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

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.

Sources