PHP just broke the internet

A critical security vulnerability in PHP, affecting about 70% of websites, led to widespread disruptions including the temporary shutdown of European government sites and massive exploitation attempts before emergency patches were released. This incident highlights the severe impact of memory corruption flaws in foundational internet technologies and underscores the urgent need for immediate updates and long-term shifts toward more secure programming languages.

The recent PHP security crisis has caused widespread disruption, temporarily taking down European government websites and forcing major companies to suspend online services. This turmoil stems from critical vulnerabilities in PHP, a language that still powers about 70% of websites with known server-side languages, including major platforms. The vulnerabilities, collectively called PHP2 shell, allow attackers to execute arbitrary code on vulnerable servers without authentication by exploiting memory corruption issues in the PHP engine. This incident highlights how a bug in PHP’s runtime can cause more damage than even a major cloud outage.

The PHP Foundation released emergency security patches on October 21st after vulnerabilities were independently reported in August 2026. The situation escalated when details about the flaws leaked online on October 20th, including a security company accidentally publishing a video demonstrating an exploit. This premature exposure led to a rush of researchers, attackers, and coders attempting to reproduce the exploit before patches were available. Additionally, Chain Guard released container images with the fixes over six hours before the official patch release, potentially aiding attackers in reverse engineering the vulnerabilities.

The two main vulnerabilities relate to PHP’s memory management and error handling, particularly when fatal errors like out-of-memory conditions occur. Normally, PHP cleans up memory after processing requests, but these flaws cause PHP to leave behind partially initialized data or references to freed memory, creating use-after-free conditions. Attackers can exploit these memory corruption issues by crafting specific HTTP requests, enabling them to extract sensitive data or execute arbitrary code remotely. Researchers demonstrated remote code execution on popular platforms like WordPress and Drupal, showing the severity of the problem.

The impact has been significant, with government websites in France, the Netherlands, and Finland taken offline as a precaution. Cloudflare reported massive malicious traffic volumes, with attackers constantly modifying payloads to bypass security measures. Amazon’s threat intelligence even detected exploitation attempts dating back to October 17th, indicating that some attackers were experimenting with the vulnerabilities before public disclosure. While millions of exploitation attempts have been recorded, the number of confirmed successful breaches remains unclear, but the attack surface is vast due to PHP’s widespread use and the vulnerabilities affecting versions going back over a decade.

This incident also underscores the growing role of AI in cybersecurity, as researchers noted that large language models helped turn complex memory vulnerabilities into working exploits. This dual-use nature of AI means it can both improve and threaten large systems. The takeaway for developers is urgent: update PHP immediately to mitigate risks, and consider longer-term strategies like rewriting applications in more secure languages such as Rust. The PHP crisis serves as a stark reminder of the ongoing challenges in securing foundational internet technologies.

Useful Links