[Urgent] Two Unauthenticated RCE Vulnerabilities in PHP Fixed in 8.5.12 and Other Releases (PHP2Shell)

On October 21, 2026, the PHP project released a security update fixing two critical vulnerabilities that can allow unauthenticated remote code execution (RCE). The releases went out at around 22:00 JST on October 21 (13:00 UTC), although the php.net ChangeLog lists them under October 22.

Bottom line: if you run PHP 8.2 to 8.5, update to a fixed version and restart your workers (PHP-FPM or Apache) as well.

Overview of the vulnerabilities

Both vulnerabilities are rated 9.2 (Critical) on CVSS v4.0.

  • CVE-2026-109618: memory corruption when a request hits the memory limit (out-of-memory, OOM), which can lead to RCE.
  • CVE-2026-109619: stale global state that outlives the request and is reused by a later request, which can lead to RCE.

Any environment that serves web requests is affected, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers mod_php the highest-risk setup.

Details leaked before the release, and proof-of-concept code circulated. However, the PHP Foundation says its security team did not identify any functional exploits at the time of release.

Fixed versions

BranchFixed version
PHP 8.58.5.12
PHP 8.48.4.27
PHP 8.38.3.36
PHP 8.28.2.35

PHP 8.5.12 includes these two fixes along with 90 fixes across 29 components in total.

What to do

  1. Check which PHP version you are running.
  2. Update to a fixed version above, or to the patched package from your distribution.
  3. Restart your workers (PHP-FPM, Apache and so on). Updating alone may not affect processes that are already running.

If you are on PHP 8.1 or older

These branches are no longer supported, so there is no new official release. Apply the source patch, or use a backported package from your distribution or LTS vendor. AlmaLinux, Ubuntu, Red Hat and others have started shipping patched packages.

If you cannot update right away (PHP 8.5)

The official advisory describes a temporary mitigation: set fatal_error_backtraces=0 and restart every worker. This is only a stopgap, and updating is the only complete fix.

Reaction in Japan

Japanese media have reported that several major services carried out emergency maintenance or suspended service in response to this vulnerability. It is worth checking your own environment for exposure as soon as possible.

Summary

  • Two critical vulnerabilities (CVSS v4.0 9.2) that can lead to unauthenticated RCE have been fixed.
  • Fixed versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
  • After updating, restart your workers such as PHP-FPM or Apache.
  • For PHP 8.1 and older, use the source patch or a backported package.

This article reflects information as of October 24, 2026. Please check the primary sources below for the latest status.

References

コメントを残す