7feb5d84-d3d8-4b16-842a-8890e4a6b1d2

Does the PHP2shell vulnerability that threatens 70% of the internet affect you?

Yesterday, a security advisory was released for all versions of PHP. Despite all the “PHP is dead” and “Does anyone still use PHP?” memes about 70% of all the applications on the internet use PHP so saying that this is one of the biggest security events of recent history isn’t an exxageration.

The source of the security advisory is a vulnerability across all versions of PHP that allows remote attackers to execute commands on your server, giving them practical full control of your server – and website. Cyber Security advisory organisations urged members to take their sites offline until the vulnerability was patched.

The vulnerabilities, identified as CVE-2026-109618 and CVE-2026-109619, have both received a critical severity score of 9.2 under CVSS v4.0.

What versions were affected?

All versions of PHP are affected by the vulnerability. Only the latest update which was released yesterday patches out the vulnerability. However, PHP only supports each version of PHP for 4 years and as a result only the currently supported versions have received a patch. As a result, the only safe versions of PHP are the following:

  • 8.2.35
  • 8.3.36
  • 8.4.27
  • 8.5.12

PHP 8.0.x, 8.1.x, 7.x and all older versions are no longer supported and no official patch will be made available for them, meaning all versions should be considered to be insecure (as they already should have been if you follow the security advice from the PHP Foundation itself which urges users to migrate to a supported version when a version reaches EOL).

What is PHP2Shell?

PHP2Shell refers to two vulnerabilities in PHP’s handling of memory and errors during the processing of web requests.

Under certain circumstances, attackers can exploit these vulnerabilities by sending specially crafted HTTP requests to a vulnerable server. Successful exploitation could allow an attacker to execute arbitrary code with the privileges of the affected PHP process.

Depending on the server configuration and the permissions available to that process, this could result in unauthorized access, exposure of sensitive information, modification of website content or further compromise of the underlying infrastructure.

The two vulnerabilities are:

  • CVE-2026-109618 (CVSS 9.2): A vulnerability related to PHP’s handling of out-of-memory (OOM) conditions. When a specially crafted request causes PHP to encounter a memory allocation error, internal data may be left in an invalid state. Subsequent cleanup operations can result in memory corruption, potentially allowing remote code execution.
  • CVE-2026-109619 (CVSS 9.2): A vulnerability involving stale global state following a fatal error. Under certain conditions, PHP may retain references to memory that has already been released. Subsequent requests processed by the same worker may access this invalid state, potentially resulting in memory corruption and remote code execution.

Both vulnerabilities affect PHP itself rather than a particular content management system, framework or application.

This distinction is important because updating an application such as WordPress does not necessarily resolve vulnerabilities in the underlying PHP installation.

Which websites and applications are affected?

PHP is used by a substantial portion of the internet, making these vulnerabilities particularly significant.

Popular content management systems such as WordPress, Drupal, Joomla and MediaWiki rely on PHP. The same applies to e-commerce platforms such as Magento and PrestaShop, as well as applications developed using frameworks such as Laravel and Symfony.

However, the potential impact extends beyond traditional websites.

PHP may also be included in hosting control panels, vendor appliances, Windows applications and other software products that incorporate their own PHP runtime.

Organizations should therefore consider all PHP installations within their infrastructure, including those that may not be immediately visible.

The vulnerabilities affect PHP installations processing web requests, including deployments using PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed.

How to determine whether your website is vulnerable

The first step in determining whether your website is affected by PHP2Shell is identifying the PHP version used by your hosting environment.

Depending on your website and hosting provider, this information may be available through your content management system, hosting control panel or server administration tools.

For a practical, step-by-step explanation of how to identify your PHP version and determine whether an update is necessary, see the following guide:

How to detect if your website is vulnerable to PHP2shell

If you are unsure whether your website uses PHP or whether your installation has received the necessary security updates, contact your hosting provider, system administrator or application developer.

What should organizations do?

Given the severity of PHP2Shell, organizations should prioritize identifying affected installations and applying the appropriate security updates.

The Centre for Cybersecurity Belgium (CCB) recommends treating these vulnerabilities with high priority.

1. Identify potentially vulnerable systems

Start by creating an inventory of PHP installations across your infrastructure.

This inventory should include public-facing websites, internal applications, hosting environments and third-party products that incorporate PHP.

Pay particular attention to internet-facing applications, as these are more readily accessible to potential attackers.

The Dutch National Cyber Security Centre (NCSC-NL) maintains an overview of PHP-based applications and products that may be affected:

https://github.com/NCSC-NL/php2shell

2. Apply security updates

Installing the appropriate security updates is the only complete solution to the underlying vulnerabilities.

Organizations should upgrade affected PHP installations to a fixed version as soon as possible, following appropriate testing to minimize operational disruption.

Security updates are available through the official PHP website:

https://www.php.net/downloads.php

For environments maintained by hosting providers, Linux distributions or other software vendors, consult the relevant vendor’s guidance and apply the updated packages they provide.

Organizations using older PHP versions should determine whether vendor-supported security patches are available or whether migration to a newer PHP version is required.

When upgrading from significantly older PHP versions, compatibility testing may be necessary. Changes between PHP releases can affect application functionality, particularly in applications that have not been actively maintained.

After applying the updates, administrators should verify that the affected services are running the patched PHP runtime.

3. Reduce exposure when immediate patching is not possible

Some organizations may be unable to apply the necessary updates immediately because of compatibility requirements, operational constraints or dependencies on third-party software.

In these situations, temporary measures should be considered to reduce the risk of exploitation.

Depending on the circumstances, these measures may include restricting public access to vulnerable applications or temporarily taking affected websites offline until the relevant security updates can be applied.

While temporarily disabling a website may have operational consequences, it can be an appropriate precaution when the potential impact of a compromise outweighs the cost of temporary unavailability.

However, temporary mitigation measures do not eliminate the underlying vulnerabilities and should not be considered alternatives to patching.

Organizations should exercise caution when implementing unverified mitigation techniques found online, as these may introduce additional problems or disrupt application functionality.

4. Increase monitoring and detection

In addition to applying security updates, organizations should strengthen their monitoring capabilities to identify potentially suspicious activity.

The CCB recommends increased monitoring and detection to support the timely identification of attempted exploitation or successful intrusions.

Organizations should review relevant web server logs, application logs and security monitoring alerts for unusual activity.

Particular attention should be paid to unexpected PHP process behavior, suspicious HTTP requests, unusual system command execution and unauthorized changes to website files.

Where there are indications of compromise, organizations should initiate their incident response procedures and investigate whether attackers may have gained access before the security updates were applied.

Applying a security patch prevents exploitation of the corrected vulnerabilities, but it does not automatically resolve an existing compromise.

Does PHP2Shell mean PHP is insecure?

The discovery of PHP2Shell does not mean organizations should stop using PHP or applications built with it.

Critical security vulnerabilities can occur in any programming language, framework or software platform. Their discovery highlights the importance of maintaining an effective vulnerability and patch management process.

For organizations, PHP2Shell also provides an opportunity to evaluate their current hosting and application maintenance arrangements.

Important considerations include whether software inventories are accurate, security updates can be deployed quickly, responsibilities for patching are clearly assigned, and critical applications can be updated without unnecessary disruption.

Organizations relying on external hosting providers should also evaluate how quickly those providers respond to critical vulnerabilities and how effectively they communicate potential risks to their customers.

Ultimately, the ability to identify, assess and remediate vulnerabilities promptly is an essential part of maintaining a secure IT environment.

Conclusion

PHP2Shell represents a significant security risk because of the severity of the vulnerabilities and the widespread use of PHP across websites, applications and other software products.

Organizations should act promptly to identify affected systems, verify their PHP versions and apply the appropriate security updates.

Where immediate patching is not possible, temporary restrictions should be considered to reduce exposure, accompanied by increased monitoring for suspicious activity.

The most important recommendation remains straightforward: identify vulnerable PHP installations and ensure they receive the necessary security updates as soon as possible.

Additional information

PHP security advisory: CVE-2026-109619

PHP official website

NCSC-NL: PHP2Shell information and affected products

PHP security advisory: CVE-2026-109618

Laat een reactie achter

Deel dit artikel

Blijf up to date met NIS2.news

Schrijf je in voor de nis2.news nieuwsbrief en mis nooit het laaste nieuws over NIS2