The PHP Security Crisis Explained: Why AI Uncovered It and How to Patch Your Site

Share On:

A conceptual 3D render of a glowing digital code structure with a magnifying glass highlighting a fractured segment of logic.

A critical security crisis has emerged within PHP, the programming language that powers much of the internet 2. The discovery of two severe vulnerabilities has led to widespread disruption, with government agencies and IT departments taking high-profile websites offline to prevent exploitation 3. These flaws, which have existed in the code for over a decade, were recently identified by artificial intelligence tools designed to audit legacy codebases 2.

To protect your infrastructure, applying a PHP vulnerability patch is now a critical priority for system administrators and site owners. The vulnerabilities allow unauthenticated attackers to execute code remotely on affected servers, potentially granting them full control over the web environment 4, 5.

The nature of the PHP security crisis

The current crisis centers on two related critical remote code execution (RCE) vulnerabilities, collectively referred to by some security agencies as “php2shell” 4, 5. These flaws reside in the core components of PHP that handle memory management and error handling—parts of the language that nearly every web request touches 4.

  • CVE-2026-109618: This vulnerability involves memory corruption during out-of-memory (OOM) handling. If a request hits the PHP memory_limit at a specific moment, the system may leave behind partially initialized data. PHP might later treat this invalid data as valid, leading to memory corruption 4, 6.
  • CVE-2026-109619: This flaw involves “stale global state.” A fatal error occurring at a precise point can leave internal states pointing to memory used by a previous request. A subsequent request handled by the same worker process can then access that freed memory, leading to a use-after-free error 4.

Both issues are particularly dangerous because they can be triggered by unauthenticated requests before any specific application code even runs 4. This means an attacker does not need a login or special permissions to target a server.

Why AI uncovered decade-old bugs

While these vulnerabilities have existed in the PHP codebase for ten years, they remained undetected by human auditors and traditional scanning tools 2. The breakthrough came from generative AI models capable of analyzing massive amounts of legacy code to find subtle logical errors 2.

AI code auditing tools are increasingly used to identify complex patterns that lead to memory corruption, such as the specific timing issues found in PHP’s OOM handling 2. This shift in discovery methods suggests that more “dormant” vulnerabilities in foundational internet technologies may be uncovered as AI tools become more sophisticated 2.

Essential steps for a PHP vulnerability patch

Security organizations, including CISA and CERT-EU, have urged immediate action to secure web servers 5, 6. Because PHP is often embedded within other software packages, it may not be immediately obvious that a system is at risk 5.

Identify and inventory systems

Administrators should first inventory all systems running PHP. This includes standard web servers and internal tools. The vulnerabilities affect all major PHP installations, including Apache with mod_php, PHP-FPM, php-cgi, FrankenPHP, and LiteSpeed 5.

Apply official updates

The PHP project has released several versions to address these flaws. You must update your environment to one of the following versions or newer 4, 5:

  • PHP 8.5.12
  • PHP 8.4.27
  • PHP 8.3.36
  • PHP 8.2.35

Mitigation for unsupported versions

If you are running PHP 8.1 or older, these versions are unsupported and will not receive an official patch 5. CISA recommends taking these systems offline until they can be migrated to a supported version. If immediate patching is impossible, a web application firewall (WAF) may provide temporary, limited protection, but it is not a substitute for a full update 5.

Monitoring for exploitation

As of late October 2026, these vulnerabilities have been added to CISA’s Known Exploited Vulnerabilities (KEV) Catalog, meaning active attacks have been observed in the wild 5. Proof-of-concept (PoC) code is also circulating publicly, increasing the risk of automated attacks 6.

IT managers should monitor for suspicious activity, such as PHP worker processes attempting to launch shells or download external tools 5. CERT-EU also suggests isolating internet-facing applications from public networks if a fix cannot be verified immediately 6.

Frequently asked questions

Which versions of PHP are affected?

All versions of PHP serving web requests are considered at risk. Official patches are available for the 8.2, 8.3, 8.4, and 8.5 branches 4, 5.

How did AI find these flaws?

AI models were used to audit the PHP codebase, identifying subtle memory management errors that had gone unnoticed by human developers for over a decade 2.

Is there a third vulnerability?

On October 23, 2026, a third RCE vulnerability was disclosed. However, it only affects web applications with highly unusual configurations and is considered an unlikely risk by the PHP team 6. No out-of-band release was issued for this third flaw, though general mitigations are advised 6.

What if I cannot update immediately?

If patching is not feasible, you should consider taking the affected systems offline or isolating them from the public internet to prevent remote exploitation 5, 6.

Conclusion

The PHP security crisis highlights the ongoing risks associated with the aging infrastructure of the modern web. With AI tools now capable of finding long-hidden flaws in legacy code, the speed at which vulnerabilities are discovered is likely to increase. For site owners and administrators, the immediate takeaway is clear: identify your PHP versions and apply the necessary patches to prevent unauthenticated remote code execution on your servers 5.

Sources

  1. ICYMI: the 7 biggest tech stories of the week, including our iPhone Duo review and the recent PHP crisis | TechRadar (techradar.com)
  2. The Download: computing’s next leap and permafrost’s climate threat | MIT Technology Review (technologyreview.com)
  3. Technology + Explainers | The Guardian (theguardian.com)
  4. Today’s PHP Security Release, and How We’re Strengthening PHP Security — The PHP Foundation — Supporting, Advancing, and Developing the PHP Language (thephp.foundation)
  5. Critical Vulnerabilities in PHP Require Immediate Patching | CISA (cisa.gov)
  6. CERT-EU – Critical Vulnerabilities in PHP (cert.europa.eu)

Written by

Nirmal Chhajed

Head Publisher

Connect on LinkedIn

*****
Related Posts
Scroll to Top

Copyright © 2025, Article Basket | All Rights Reserved.