1. Introduction
In October 2026, two critical vulnerabilities in PHP were publicly disclosed. Together, they became known as PHP2Shell. The vulnerabilities could allow an unauthenticated remote attacker to execute arbitrary code on a vulnerable PHP server, potentially gaining control over the PHP worker process and accessing data and files available to that process. The vulnerabilities are:- CVE-2026-109618 - Remote Code Execution via Out-of-Memory (OOM) corruption.
- CVE-2026-109619 - Remote Code Execution via stale global state.
2. Understanding the vulnerabilities
These are vulnerabilities in the PHP runtime itself, rather than vulnerabilities in a particular CMS such as Drupal or WordPress. This distinction is important: a vulnerable PHP installation can be exposed even when the application running on top of it has no known vulnerability of its own.2.1. CVE-2026-109618: Out-of-Memory corruption
PHP uses an internal mechanism called longjmp() to handle certain out-of-memory conditions and abort the current request. Under specific circumstances, an allocation failure can interrupt PHP while internal request data is only partially initialized. The subsequent request cleanup process may then access this invalid or uninitialized memory. An attacker can use carefully constructed requests and memory conditions to trigger this behaviour and potentially achieve remote code execution.2.2. CVE-2026-109619: Stale global state
PHP maintains internal global state between requests handled by persistent workers. Some of this state can temporarily point to memory belonging to an individual request. That memory must be properly reset before it is released. Under certain conditions, PHP can retain references to memory that has already been freed. A subsequent request may then access this stale memory before the normal initialization process replaces it. This is a use-after-free vulnerability. With carefully constructed input and memory conditions, an attacker can potentially turn this into remote code execution.3. Which PHP versions are affected?
The vulnerabilities affect PHP installations serving web requests. The affected versions in the actively supported release branches were:| PHP branch | Affected versions | First fixed release |
|---|---|---|
| PHP 8.5 | 8.5.0 - 8.5.11 | 8.5.12 |
| PHP 8.4 | 8.4.0 - 8.4.26 | 8.4.27 |
| PHP 8.3 | 8.3.0 - 8.3.35 | 8.3.36 |
| PHP 8.2 | 8.2.0 - 8.2.34 | 8.2.35 |
4. Which server configurations are exposed?
The vulnerabilities affect PHP installations handling web requests, including:- Apache with mod_php
- PHP-FPM
- PHP CGI
- FrankenPHP
- LiteSpeed
5. Relevance to the website security incident
The old website was hosted using an architecture involving Varnish, Nginx and Apache workers, with the website files shared through NFS. During the investigation, we discovered suspicious files deployed throughout the shared website filesystem. These included:.htaccess
wp-blog-header.php
wp-cron.php
wp-headre.php
The files were spread across numerous directories and had matching or very similar timestamps, indicating a bulk deployment.
The suspicious PHP code was consistent with an SEO-spam and cloaking operation, with functionality capable of retrieving remote content and executing additional PHP code.
The presence of these files demonstrated that the website environment had been compromised.
The PHP2Shell vulnerabilities are particularly relevant because they provide a possible explanation for how an attacker could obtain remote code execution without first compromising the Drupal application itself.
However, there is an important limitation to this conclusion.
Although the PHP vulnerabilities are a plausible attack vector, we have not established forensic evidence connecting either CVE directly to the compromise of this particular server.
The exact initial entry point remains unconfirmed.
To establish that connection, we would need evidence such as the actual PHP runtime and build in use at the time, relevant web server logs, PHP worker crashes or other forensic indicators associated with exploitation.
6. Security updates and remediation
The PHP development team released the following fixed versions on 21 October 2026:- PHP 8.5.12
- PHP 8.4.27
- PHP 8.3.36
- PHP 8.2.35
7. References
[hr] This article documents the two PHP vulnerabilities and their relevance to the website security investigation. It does not claim that either CVE was conclusively responsible for the incident.- Log in to post comments
- 33 views