PHP2Shell Security Alert: Critical PHP Vulnerabilities Allow Remote Code Execution

Two critical PHP2Shell vulnerabilities with a CVSS score of 9.2 could allow attackers to execute code on vulnerable servers without authentication. Emergency security updates have been released, and administrators are urged to patch affected PHP versions immediately.

php security vulnerabilities
php security vulnerabilities, PHP2shell security alert
Advertisement

PHP faces a major cybersecurity challenge after the disclosure of two critical remote code execution (RCE) vulnerabilities on October 21, 2026.

Collectively known as PHP2Shell, the flaws are tracked as CVE-2026-109618 and CVE-2026-109619. Both vulnerabilities have received a CVSS v4.0 severity score of 9.2, highlighting the seriousness of the threat.

The vulnerabilities affect PHP's core engine and could allow attackers to execute malicious code on vulnerable servers without authentication.

Advertisement

Websites and applications built using platforms such as WordPress, Drupal and Joomla could also be at risk if they run affected PHP versions.

The PHP development team released emergency security updates after details of the vulnerabilities became public earlier than planned. The flaws affect PHP installations that serve web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed.

The PHP team has identified Apache environments using mod_php as particularly vulnerable because exploitation can occur before application code runs.

What Are the PHP2Shell Vulnerabilities?

PHP2Shell refers to two separate vulnerabilities involving memory corruption and improperly managed internal state. Both can potentially lead to remote code execution, allowing attackers to run code with the privileges of the affected web server process.

1. CVE-2026-109618: Remote Code Execution Through Out-of-Memory Corruption

The first vulnerability involves how PHP handles out-of-memory (OOM) errors during request processing.

PHP uses an internal function called longjmp() to interrupt execution when certain operations exceed configured memory limits. If an out-of-memory error occurs while PHP parses a multipart HTTP request, the process may stop before its internal data structures are fully initialised.

During subsequent cleanup, PHP may incorrectly treat uninitialised or invalid memory as valid data. This can lead to memory corruption that an attacker may exploit to execute arbitrary code.

The vulnerability is particularly concerning for systems running Apache with mod_php, where a specially crafted request can potentially trigger exploitation before the website's application code is executed.

2. CVE-2026-109619: Remote Code Execution Through Stale Global State

The second vulnerability concerns PHP's handling of internal global state associated with individual requests.

Certain internal variables can retain references to memory used by a request even after that memory has been released. If the state is not correctly reset, a subsequent request handled by the same worker process may interact with these outdated references before normal initialisation is completed.

This can create a use-after-free memory condition, potentially allowing an attacker to manipulate the application's execution and achieve remote code execution.

Unlike the first vulnerability, this issue is not limited to Apache with mod_php. According to PHP's security advisory, all PHP installations serving web requests are potentially affected if they run vulnerable versions.

Why Are These Vulnerabilities Dangerous?

The main concern is that attackers don't need to authenticate to exploit these flaws. A vulnerable server could potentially be compromised by sending specially crafted HTTP requests.

Successful exploitation could allow attackers to execute code with the privileges of the PHP worker process. Depending on the server's configuration and permissions, this could lead to website compromise, unauthorised access to sensitive information or further malicious activity.

The vulnerabilities may also affect websites built on widely used content management systems, including WordPress, Drupal and Joomla, because these platforms rely on PHP.

However, the risk depends on the PHP runtime version and server configuration, not the content management system alone.

The vulnerabilities have prompted urgent warnings from cybersecurity organisations, with administrators being advised to identify affected systems and apply the available security updates immediately.

PHP2Shell: Emergency Security Updates Released

The PHP development team released patched versions on October 21, 2026. Administrators should upgrade to the following versions or newer releases within the same supported branches.

Patched PHP Versions
PHP branchPatched version
PHP 8.5PHP 8.5.12 or later
PHP 8.4PHP 8.4.27 or later
PHP 8.3PHP 8.3.36 or later
PHP 8.2PHP 8.2.35 or later

These releases address both critical vulnerabilities. Administrators should consult the official PHP security advisory and their operating system vendor's guidance to determine the appropriate update for their environment.

What About Older PHP Versions?

PHP 8.1 and earlier versions are no longer supported by the PHP project and do not receive regular security updates from the project.

Organisations running these versions should plan an immediate migration to a supported PHP branch. However, some enterprise Linux distributions and long-term support vendors may provide backported security fixes for older packages.

Administrators should check directly with their vendors to confirm whether a patched package is available, rather than assuming an older installation remains vulnerable or has been fixed.

What Should Website Owners and Administrators Do?

Organisations operating PHP-based websites should treat PHP2Shell as a critical security issue and take the following steps.

  • Update PHP immediately: Upgrade affected installations to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, as appropriate, or install a newer patched release.

  • Identify every affected environment: Check web servers, PHP-FPM services, containers, hosting environments and third-party applications that may include their own PHP runtime.

  • Check vendor security updates: If PHP is supplied through an enterprise Linux distribution or managed hosting provider, confirm that the relevant security fixes have been applied.

  • Restrict public access if patching is delayed: If an affected server cannot be updated immediately, isolate internet-facing applications from public networks or take them offline until effective remediation is complete.

  • Review server activity: Examine relevant web server and PHP logs for suspicious requests or unexpected behaviour, particularly if the system was exposed to the internet before patching.

The PHP development team has stated that updating is the only complete fix. Temporary configuration changes should not be treated as a substitute for installing the security updates.

The PHP2Shell vulnerabilities highlight the risks posed by security flaws in widely deployed server-side software. Because both vulnerabilities may allow unauthenticated remote code execution, organisations using affected PHP versions should prioritise remediation.

Although emergency patches are available, administrators must ensure all relevant PHP installations are updated, including those embedded in containers, third-party applications, and hosting environments.

Prompt action can help reduce the risk of server compromise and protect websites and the sensitive information they handle.

Advertisement

Share

Loading comments...