PHP Apocalypse: Two Core Vulnerabilities Threaten 70% of Websites
Two critical memory safety flaws in PHP core, dubbed PHP2Shell, affect nearly 70% of websites and could allow for remote code execution.

The internet faces an unprecedented crisis as two critical memory safety vulnerabilities, collectively known as PHP2Shell, have been discovered in the core of the PHP scripting language. These flaws, affecting versions released over the last decade and dating back to PHP 5.4, put an estimated 70% of all websites at risk of exploitation, potentially leading to remote code execution on affected servers.
The vulnerabilities were initially identified by an independent researcher in August. Following a coordinated disclosure process with the PHP Foundation, the severity of the flaws prompted an emergency patch release. However, the situation escalated when details and exploit demonstrations began to leak, forcing the PHP Foundation to issue a late-night warning and accelerate the deployment of patches to mitigate widespread attacks.
PHP2Shell allows attackers to manipulate memory regions that PHP processes, enabling them to hijack execution flow and achieve remote code execution. This could grant attackers full control over websites, allowing them to steal sensitive data from users or distribute malware. The sheer ubiquity of PHP in web development means that the potential impact is vast, affecting everything from small blogs to large e-commerce platforms and critical infrastructure.
While emergency patches were released, a significant challenge remains: legacy servers running older, unpatchable versions of PHP. These systems, unable to receive direct updates, are left exposed and vulnerable. For these systems, the only recourse is often a complete shutdown and reinstallation with a supported version, a complex and potentially disruptive process for many organizations.
Adding to the urgency, Amazon Web Services (AWS) reported seeing exploitation attempts at least four days before the official patches were made available. While no successful, widespread exploitation has been confirmed as of late Friday, the presence of proof-of-concept exploits and ongoing attempts suggests that attackers are actively working to weaponize these vulnerabilities. Security experts caution that it may only be a matter of time before successful attacks emerge, especially as AI tools could accelerate the development of exploit chains.
The PHP Foundation and security researchers are urging all website administrators to apply the emergency patches immediately. For those unable to patch due to legacy systems, a migration to a supported PHP version is strongly recommended. The incident highlights the ongoing challenges of maintaining security in a web infrastructure heavily reliant on older, foundational software.
This crisis underscores the fragility of the internet's backbone, often built with older technologies that, while robust, can harbor deep-seated vulnerabilities. The PHP2Shell flaws serve as a stark reminder that even widely adopted and seemingly stable software can harbor critical security risks, necessitating continuous vigilance and proactive patching to protect against evolving threats.
Pentester Jaydip Modhwadia, known online as 'Killa,' has successfully exploited the PHP2Shell vulnerability in a capture-the-flag contest, claiming a $2,000 Bitcoin prize. Modhwadia demonstrated Remote Code Execution (RCE) within approximately three hours, bypassing server-side security measures like ASLR. His proof-of-concept, a Python script, highlights the weaponization potential of PHP2Shell against live targets, even with imposed constraints like a 1MB request limit.