On 21 October 2026 the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to close two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, known as PHP2Shell. Both are rated CVSS v4.0 9.2 and allow unauthenticated remote code execution: one crafted request from a stranger, and they run commands as the web server user. The PHP security advisory says it plainly: updating is the only safe choice.

This is not a WordPress, Magento or Laravel bug. The flaws sit in the PHP engine itself, so every PHP site is in scope however good its own code. The fixes shipped a day early after details leaked on social media on 20 October.

What the two bugs are, in plain words

CVE-2026-109618 is about running out of memory at the wrong moment. If a request hits PHP's memory limit while the engine is still setting up, it bails out abruptly and cleanup then treats half-built data as valid. A crafted multipart form upload can force this while staying inside the normal post_max_size: unlimited part headers, empty file fields that do not count against max_file_uploads, and nested field names all push memory use past the limit.

CVE-2026-109619 is about leftovers. A PHP worker serves requests back to back, and some engine-level state (error, session, object, extension) can keep pointing at memory from a request that already finished. The next request on the same worker can use that stale state before initialisation resets it, a use-after-free. One confirmed way in is session upload progress, enabled by default and running before application code, so it works even on sites that never call session_start().

The bugs were found independently by Ryan Austin of Calif, working in OpenAI's Patch the Planet project, and by Wiz Research, with AI tooling assisting both efforts.

Why your CMS or framework cannot protect you

The vulnerable code runs before your application does, so updating WordPress, Magento, Drupal, Joomla, Laravel or Symfony changes nothing. Sansec reports Calif demos of unauthenticated code execution on Magento 2.4.9, Drupal 11.4.3, Joomla 6.1.4, Laravel 13.11 and Symfony 8.1; Wiz did the same against the latest official WordPress image. Sansec adds that CVE-2026-109618 can also leak server memory, including passwords, session tokens, API keys and TLS private keys.

Why mod_php is the worst case

PHP rates the risk highest for Apache with mod_php, with a demonstrated exploit where an unauthenticated request triggers the attack before any application code runs. When request startup fails, mod_php runs request shutdown anyway and processes the corrupted state, while PHP-FPM exits the affected child process. That is why no complete FPM exploit of CVE-2026-109618 has been shown, although the session path of CVE-2026-109619 works on both. Everything else is still in scope; Apache modules just go first.

Why the config workarounds are not a fix

PHP lists settings for people who cannot update immediately, with a warning attached: they reduce exposure to specific attack paths but do not make an installation safe.

; partial workarounds only. PHP: "updating is the only safe choice"
memory_limit = -1
session.upload_progress.enabled = 0
; PHP 8.5 only
fatal_error_backtraces = 0
  • memory_limit=-1 must be set administratively (php_admin_value in the FPM pool or Apache config) so nothing restores a finite limit; a real allocation failure can still reach the vulnerable path.
  • session.upload_progress.enabled=0 goes in php.ini, the FPM pool or the server config, then restart every worker. PHP says do not rely on ini_set() or FPM .user.ini. This blocks the confirmed session paths and nothing else.
  • fatal_error_backtraces=0 on PHP 8.5 blocks the confirmed backtrace path only.
  • Rejecting multipart/form-data at the web server (Sansec) stops every known trigger but breaks file uploads and some checkout forms.

What to do today

  1. List every server, container and hosting account running PHP, with its exact version (php -v or the control panel). Agencies: every client site.
  2. Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your distribution's patched package (Patchstack notes Ubuntu 22.04 ships the fix in php8.1 8.1.2-1ubuntu2.28). Restart every worker: FPM pools, Apache, containers.
  3. On shared hosting, ask your host whether its PHP builds include the 21 October fixes, or switch versions yourself in the control panel.
  4. Cannot patch within hours? Apply the partial workarounds above, skip the unofficial "fix" plugins and snippets Patchstack warns about, and consider maintenance mode for high-value sites until you can.
  5. Check logs for multipart POSTs carrying PHP_SESSION_UPLOAD_PROGRESS on pages that do not use it, memory errors "Unknown on line 0" and Apache segfaults, the indicators Datadog lists. A successful exploit can return HTTP 200.

If you are on PHP 8.1 or older

PHP 8.1 and older get no official release. Use a backported package from your distribution or LTS vendor, PHP's minimal source backports for 7.4, 8.0 and 8.1 if you build from source, or move to a supported branch. The official Docker php image has no fix for 8.1 or older (Sansec), so rebuild those containers on 8.2 or newer. watchTowr confirmed PHP 7.3 and older, including PHP 5, are affected with no fix at all, and PHP 8.2 itself reaches end of life on 31 December 2026, so plan the next jump now.

How Scantinel helps

Scantinel scans your site from the outside: it fingerprints the PHP version exposed in headers and banners, flags end-of-life or unpatched runtimes, and finds exposed files such as phpinfo pages. It cannot see inside your server or prove that a memory bug is exploitable on your setup. Treat an old-PHP finding as a prompt to patch; the only fix for PHP2Shell is the update.