PHP2Shell refers to two critical security vulnerabilities in the PHP programming language that allow attackers to take over website servers remotely without logging in. With a severity rating of 9.2 out of 10, the threat has prompted the temporary shutdown of several website services in different countries. Japan's prime minister has even issued a warning urging website administrators to install security updates immediately.
PHP2Shell has attracted attention because PHP is one of the programming languages widely used to build websites and web applications. Security flaws in this technology could have a broad impact, from business websites to government services.
What Is PHP2Shell, and Why Is It Dangerous?
PHP2Shell is the name given to two security vulnerabilities discovered in core PHP components. Both flaws allow Remote Code Execution (RCE), a condition in which an attacker can run commands on a server remotely.
According to a Google Cloud report, both PHP2Shell vulnerabilities received a severity score of 9.2 under the CVSS version 4.0 scoring system and are classified as critical.
This means that, if successfully exploited, these flaws could allow attackers to access sensitive information, modify data, and disrupt website operations.
The Two Security Flaws Behind PHP2Shell
PHP2Shell involves two main vulnerabilities related to memory management in PHP.
1. CVE-2026-109618: A Memory Management Error
The first vulnerability occurs when PHP runs out of memory while processing a request. Under certain circumstances, PHP may treat information that has not been fully processed as valid data.
This error creates an opportunity for attackers to manipulate processes running on the server.
2. CVE-2026-109619: Use of Invalid Memory Information
The second vulnerability involves a condition in which PHP continues to use internal information from a previous request, even though the memory storing that information has already been freed.
If exploited by an attacker, this condition can disrupt server processes and pave the way for malicious code execution.
Both vulnerabilities are dangerous because, under certain conditions, they can be exploited without a user account or administrator access.
Why Did Japan's Prime Minister Issue a Warning About PHP2Shell?
The PHP2Shell threat drew international attention after several organizations and government agencies took emergency measures to secure their websites.
On October 21, 2026, Japanese Prime Minister Sanae Takaichi publicly urged website administrators to check their use of PHP and install security updates immediately.
If updates could not yet be installed, temporarily shutting down website services was one of the recommended precautions.
Several websites and services in countries including Japan, the Netherlands, and Finland were temporarily taken offline as a precaution.
As reported by The Indian Express, these measures were intended to reduce the risk of attacks while security updates were being installed.
However, a website being temporarily taken offline does not necessarily mean it has been compromised. In many cases, service suspension is a preventive measure taken before an attack occurs.
How Does PHP2Shell Affect Website Security?
PHP is widely used behind the scenes in websites and web applications, including platforms such as WordPress and frameworks such as Laravel.
Because PHP runs on the server, vulnerabilities in its core components can pose serious risks if they are not addressed promptly.
The Risk of Data Theft and Modification
If attackers successfully exploit PHP2Shell, they could gain access to information stored on the server.
This information may include databases, credentials, or other sensitive data accessible to the website process.
In addition to reading information, attackers may also be able to modify or delete data.
The Risk of Website Server Takeover
One of PHP2Shell's biggest threats is the possibility that attackers could run malicious code without logging in.
This could allow attackers to carry out unauthorized activities, including installing malware or creating hidden access to the system.
However, the extent of the impact still depends on the server configuration, the permissions of the PHP process, and the condition of the targeted system.
According to Sophos, these vulnerabilities allow code execution with the privileges of the web server account.
What Role Did AI Play in the Discovery of PHP2Shell?
One interesting aspect of the discovery of PHP2Shell is the use of artificial intelligence (AI) in cybersecurity research.
Security researchers at Wiz used several AI models to help discover and analyze the PHP vulnerabilities.
Google Cloud explains that AI technology, including Gemini, contributed to identifying vulnerabilities, developing testing methods, detecting attacks, and validating security fixes.
Meanwhile, security company Calif also reportedly discovered one of the vulnerabilities with the help of an AI model from OpenAI.
AI Helps Find Vulnerabilities, but It Can Also Be Misused
The use of AI demonstrates how this technology can help researchers analyze complex security problems.
Tasks that previously required lengthy analysis can benefit from AI's ability to examine and understand code.
However, similar capabilities could also be used by malicious actors to accelerate the development of attack methods.
AI's development in cybersecurity therefore has two sides: it can help identify and fix vulnerabilities while also potentially increasing attackers' capabilities.
Which PHP Versions Are Affected by PHP2Shell?
The PHP development team released security updates on October 21, 2026, to address both vulnerabilities.
According to Google Cloud, the following PHP versions include the fixes:
| PHP Branch | Patched Version |
|---|---|
| PHP 8.5 | 8.5.12 or later |
| PHP 8.4 | 8.4.27 or later |
| PHP 8.3 | 8.3.36 or later |
| PHP 8.2 | 8.2.35 or later |
| PHP 8.1 and earlier | Migration to a supported PHP branch is required |
PHP 8.1 and earlier versions are past their regular support period. Users of these versions are therefore advised to migrate to a supported PHP version that has received the security fixes.
Source: Google Cloud – Responding to Core PHP Vulnerabilities.
How Can You Protect Your Website from PHP2Shell?
For website administrators, the most important step is to ensure that the PHP version in use has received the security updates.
Actions you can take include:
-
Check the PHP version in use. Make sure your website runs on a version that includes the PHP2Shell security fixes.
-
Update PHP promptly. Use a patched PHP release from a supported version branch.
-
Review the server environment. Make sure updates cover other services that use PHP, as well as your main website.
-
Monitor suspicious activity. Check for file changes, unusual process activity, or signs of unauthorized access.
-
Consider temporarily suspending services if necessary. If updates cannot yet be installed, restricting access to vulnerable services can help reduce the risk.
These steps align with the security recommendations published by Sophos and Google Cloud.
Remember that using WordPress, Laravel, or other PHP-based technologies does not automatically mean a website has been compromised. Risk needs to be assessed based on the PHP version, configuration, and server security conditions.
Frequently Asked Questions (FAQ)
1. Can PHP2Shell Attack Every Website?
Not every website is affected. PHP2Shell involves vulnerabilities in PHP, so websites or applications using vulnerable PHP versions need attention. Websites running patched PHP versions have protection against these two flaws.
2. Are WordPress Websites and Laravel Applications Vulnerable to PHP2Shell?
WordPress websites and Laravel applications use PHP, so their security also depends on the PHP version running on the server. Administrators need to ensure PHP has been updated to a version that includes the security fixes.
3. Did AI Cause PHP2Shell?
No. The PHP2Shell vulnerabilities stem from pre-existing problems in PHP code. AI was used to help discover and analyze the flaws. However, AI could also accelerate the development of exploitation methods.
Understanding Website Security and PHP Programming
The PHP2Shell case shows that website security depends on more than the features and appearance users see. The technology behind a website, including its programming language and server environment, also plays an important role in keeping systems secure.
For anyone interested in learning web development, understanding how PHP works, server management, and the basics of web application security can be an important part of building programming skills.
At Koding Akademi, we encourage you to keep developing your understanding of coding and technology, including how web applications are built and managed.
Want to explore programming and website development in greater depth? Learn with us at Koding Akademi and discover learning opportunities that match your interests.