Tech Deep Dive

PHP2Shell: When PHP’s Runtime Loses Track

AI

A guide to how PHP2Shell’s two memory-safety flaws can leave invalid state available to later processing, why the risks depend on the PHP runtime, and what a complete fix requires.

What was said, and where it came from

  1. More than sixty-nine percent of websites whose server-side language is known use PHP.

  2. PHP2Shell refers to CVE-2026-109618 and CVE-2026-109619.

  3. Both vulnerabilities have a CVSS v4.0 score of 9.2.

  4. Successful exploitation can allow remote code execution without authentication or user interaction.

  5. The flaws are in PHP’s runtime, not in a particular application’s own code.

  6. Astra’s report says Wiz demonstrated unauthenticated remote code execution against WordPress, Drupal, and Joomla.

  7. A use-after-free occurs when software continues using memory after it has been released.

  8. A type-confusion bug occurs when software interprets data as the wrong kind of object.

  9. CVE-2026-109618 involves PHP’s handling of an out-of-memory error and can leave internal state incomplete or stale.

  10. A later request can interact with the stale state left after that failure.

  11. Wiz demonstrated that this family of issues could corrupt PHP process memory and achieve unauthenticated remote code execution.

  12. The researchers also demonstrated a related memory-disclosure issue that could expose data held in a PHP worker.

  13. CVE-2026-109619 involves internal state that can persist across requests and problems involving OPcache, PHP’s bytecode caching system.

  14. If a reference outlives the memory it points to, later execution can access invalid state.

  15. Akamai’s report says PHP processes upload-progress information before the target script begins executing.

  16. Akamai describes one attack path in which PHP retains pointers to data that is freed and replaced during session handling.

  17. OpsMx describes Apache with mod_php as the highest-risk setup because a demonstrated attack can run before application code.

  18. OpsMx says the session upload-progress path for CVE-2026-109619 was validated on PHP-FPM, while a complete PHP-FPM exploit for CVE-2026-109618 had not been shown.

  19. OpsMx says the CVE-2026-109619 path requires two requests to reach the same worker.

  20. Astra says the fixed upstream releases are PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12.

  21. Astra says updating the application does not update the PHP runtime underneath it.

  22. Astra recommends restarting affected services and confirming the version actually running in production.

  23. Astra says temporary workarounds reduce exposure but do not replace patching.