HomeRésuméOpen SourceWorkBlog

PHP2Shell: Thoughts on Security Pre-Release Announcements

Monday, 30 November 2026

The severity of the PHP2Shell vulnerabilities prompted the PHP security team to issue a security pre-release announcement, which was not previously part of the release process. They also issued a security pre-release announcement a few weeks later for the next round of security releases.

If this is going to be part of the standard security release process going forward, I figured I should document my thoughts.

Status Quo Ante

Before PHP2Shell, the procedure for the initial public disclosure of security issues involved much less fanfare. On Tuesday, when preparing a stable release, the security fixes are included in the tagged version; at that point, the code changes for the security issues are made public in the release branches and tags, and included in the tarballs.

To be clear, these were historically made public two days before the security releases were actually announced. Anyone watching the php/php-src, php/web-php, or php/web-php-distributions could have seen the code and tests, figured out the underlying security vulnerabilities, and tried to exploit them before the fixes were even announced.

For PHP2Shell, the vulnerabilities were severe enough that the fixes were not made public until the actual release announcement; see my timeline for more details.

But, before the release announcement, there was a pre-release announcement giving people a heads-up. Before the actual fixes were made public, people knew that the next release would address some kind of security issue. Those pre-release announcements are what I want to talk about today.

Note that this entire discussion is based on the assumption that, moving forward, the code for PHP security releases is not going to be public until the releases are announced. This is also about giving notice to general PHP users, rather than the distribution packagers that have private early access.

The Case Against

Announcing security issues ahead of publishing fixes can give bad actors time to prepare to try and exploit the issues once they are public. With the rise of AI, the time it takes to go from a vulnerability being disclosed (as part of the fix) to reverse engineering the original issue and figuring out how to exploit it has decreased significantly. Even if the GitHub advisory with the security report is not made public immediately, security fixes generally come with regression tests and helpful commit messages.

Let us consider some of the security fixes in PHP 8.5.6, which was the first security release that I helped with. We don't even need to look at the actual changes for the security issues - the NEWS file includes such helpful tips (for attackers) as the fact that there is an XSS vulnerability in the FPM status endpoint (GHSA-7qg2-v9fj-4mwv), or that the PDO_Firebird extension permits SQL injections via NUL bytes (GHSA-w476-322c-wpvm). Extrapolating from the description of the issue into a working exploit is fairly easy in both cases.

While not all security issues are as easy to exploit, I hope the point is clear. If an attacker is ready for the announcement, they have a window in which potential targets will not have been able to upgrade to the new versions of PHP. By signalling an upcoming security release, the PHP project is signalling to attackers that new avenues of attack are about to be disclosed, and if they act quickly targets are unlikely to have fixed the issues.

The Case in Favor

That said, attackers are not the only ones who can take advantage of early notifications of a security release. System administrators can adjust their schedules to plan to update to the newest patch version of PHP immediately. Depending on how long these upgrades take and when the system packages are available on their systems, upgrades might take anywhere from a few minutes to a few hours once a new release is announced. A warning ahead of time provides an opportunity to prepare for and plan on doing the upgrade once it is released, rather than scrambling.

Those building PHP from source might require a few extra minutes to rebuild their deployments, but even that shouldn't add too much overhead - I frequently rebuild PHP from source during development, and on a personal laptop it only takes a few minutes when building from scratch. Most security releases don't involve wide-ranging changes to multiple files, and recompilation should be fairly quick.

Pre-release announcements also help give a sense of perspective regarding the security releases. Not all security fixes are created equal - for example, regardless of how severe the PDO_Firebird vulnerability mentioned above is, for servers that are not using the PDO_Firebird extension, advanced notice would mean that server admins don't need to scramble the day of to determine if they are affected. Similarly, a remote code execution vulnerability is fundamentally different from a denial of service issue (e.g. GHSA-mmf9-xm3v-hg2x or GHSA-rgrp-mwpx-f6rm). The former renders a site insecure, the latter primarily affects availability and abuses server resources. Yes, it is a security issue, but not one that needs to be addressed as urgently. Downtime, especially for critical services, is a problem, but the immediate threat is mitigated once the upgrade is performed. With a remote code execution vulnerability, however, an attacker could have already compromised the server, a compromise that could presist well after the initial issue is patched.

My View

In an ideal world, we would not have any security vulnerabilities. In a slightly less ideal world, we would give advanced notice to system administrators, but not to attackers. Since we don't live in either of those worlds, we are left with the choice of giving advanced notice to everyone, or to no one.

Generally, I would prefer that we give pre-release security announcements with some level of detail (whether the default configuration of PHP is affected, whether optional extensions are required, severity) at least a day or two before the release. Otherwise, system administrators may be caught flat-footed.

That said, this change isn't a decision I can make unilaterally. I am a release manager, but I am not the only release manager, nor am I a part of PHP's security team. We'll see what others think.