Insights — Technology — 26 Oct 2026 — 4 min read
PHP2Shell: two critical PHP flaws let attackers take over servers. Update now

On 21 October 2026, PHP fixed two critical vulnerabilities, known as PHP2Shell, that allow remote code execution without a password. Attacks have already been seen. Who is affected, and what to do today.
On 21 October 2026, the PHP project released emergency updates for two critical vulnerabilities nicknamed “PHP2Shell”: CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 out of 10 (CVSS v4.0) and allow an attacker to run code on a server remotely, without any account or password.
What the flaws are
- CVE-2026-109618 is in the way PHP handles out-of-memory errors: request data can be left partly initialised, and cleanup later treats it as valid.
- CVE-2026-109619 comes from PHP keeping request-specific state after its memory has been freed: a later request on the same worker can read that stale state.
- In both cases, the result can be remote code execution and full control of the server.
Why it is urgent
- Technical details leaked on 20 October, the day before the patch, according to Sansec.
- Security firms, including watchTowr, report that the flaws are already being exploited in the wild.
- Every PHP version before the fixed releases is affected, including old branches that no longer receive updates.
The fixed versions
- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35
Each branch has its own fix: you update within the branch you already use. PHP 8.1 and older will not receive a patch, so servers still running them remain exposed. PHP 8.2 reaches end of life on 31 December 2026.
Who is affected
Any website or application running on PHP: WordPress, WooCommerce, PrestaShop, Magento, Laravel, Drupal, and many custom sites. In Morocco, a large share of business websites run on WordPress on shared hosting, so this concerns a lot of companies.
What to do today
- Check the PHP version of your site in your hosting panel (cPanel, Plesk or similar), or ask your host.
- If you manage the server, update PHP to a fixed version and restart PHP-FPM or the web server.
- On shared hosting, ask your host whether the update has been applied, and get a written answer.
- If you are still on PHP 8.1 or older, plan a migration now: no fix will come for those versions.
- Waiting for the update, PHP suggests two temporary measures: set session.upload_progress.enabled to Off, and limit memory per PHP worker. They reduce the risk but do not replace the update.
And websites that do not use PHP?
A site built with another technology, for example Next.js and Node.js, is not affected by these two particular flaws. That does not make it immune to everything: every stack needs its own updates. The right question is always “who updates my site, and how fast?”.
A critical flaw that is already exploited is not a task for next week: it is a task for today.
Sources: PHP security releases of 21 October 2026, watchTowr, Sansec, Datadog Security Labs, Help Net Security, Qualys, Laravel Forge.
Not sure your website is up to date, or want a site that is maintained for you? Tell us about your project through our estimate form: we will reply with an estimate and the next steps.
Working on something ambitious?
Start a project →