Reflecting on PHP2Shell and other vulnerabilities

On October 21st, around 14:00, we made the choice to take most of the websites on our platform offline. This was in response to an announced update to PHP that was set to be published later that day, and it has been effective in keeping our platform safe from the vulnerabilities that have been published on the 21st.

However, since this was a very unusual and impactful measure, we want to elaborate on this choice.

Contents

Vulnerability tracking at Greenhost

New vulnerabilities are published on a daily basis. Greenhost follows multiple information streams about such security threats. There are feeds with security issues (CVEs), as well as subscriptions to a wide range of security mailing lists and institutes. Keeping track of this and assessing the impact of the risks involved is part daily business at Greenhost. Whenever a notification comes in, it is assessed and discussed, and we establish if and how we need to react to these (potential) threats.

The events of 21 October did not go along the normal lines, although we already started on the 20th with preparations. As a background, we provide some information on how a “normal” vulnerability disclosure is handled at then end of this blogpost. For now, let’s start with a quick timeline of events for 21 October.

Timeline

All mentioned times in this article are converted into CEST (Amsterdam timezone).

October 20th

  • 17:00 News about a vulnerability in PHP began circulating online. This mostly concerned screenshots of a quickly deleted post on HackerNews.
  • 21:30 The PHP project announced that it would release an update to PHP. To be released on the next day (October 21st) at 16:00.
  • 22:00 One of the companies involved in the security research mistakenly published a video showing their “proof of concept” (PoC, we’ll get back to this term later in this post).
  • 22:30 CERT-EU recommends: “Where immediate patching is not feasible, organisations should consider isolating internet-facing applications from public networks until a fix is available.”

October 21st

  • 02:34 On the internal communication channel of Greenhost the issue is flagged.
  • 04:30 At Greenhost the first servers were prepared for a quick update and/or additional protection, to be able to act once more information would become available.
  • 09:41 Chainguard published the update. As a security company they got advance access to the updates, under agreement to keep them secret. They broke that agreement and published their packaged version of the PHP updates well ahead of the agreed-upon time of 16:00. News coverage of this event grows and grows, leading multiple organisations to decide to shut their servers down.
  • 10:23 A preliminary block of specific uploads (multipart upload) is implemented on our platform, in anticipation of the release.
  • 14:00 A temporary placeholder page is prepared. After deliberation, Greenhost decides to take the majority of the servers offline, redirecting traffic to the placeholder page.
  • 15:34 The official PHP updates are published ahead of time.
  • 15:50 The first servers come back online.
  • 16:50 Our hosting servers are patched and restarted, all websites are back online again.
  • 23:15 Stackspin servers are updated and available again. (Main reason was the PHP-docker release was only available during the evening.)

October 22nd

Greenhost verifies the network and monitors the situation closely.

October 24th

The first working exploits are seen “in the wild”.

Why this vulnerability was different

On October 20, the first reports of the bug began circulating at 17:00, which was well before the release of the patched software was even announced, at 21:30 that day. PoCs (Proof of Concepts for the abuse, see the background information for the role of a PoC in this process) started circulating that same evening, and the next morning, at 09:41, the fix was published, more than 6 hours before the agreed-upon time.

That order of events is one of the reasons why this vulnerability led to chaos.

A second reason why this event was different from others lies in the expectation that hackers using AI tools would be able to shorten the period to reverse engineer the bug from the updated code significantly. This could mean that the period between the release of the update and the first effective hacks could be shorter than 15 minutes.

This expectation was reinforced by the PoCs circulating all over the web on the 21st, and reports from patterns in firewalls and logs consistent with people trying to abuse this vulnerability.

These factors combined led to full-blown panic all over the internet. Specifically in the Netherlands, many hosters and institutions therefore decided to temporarily pull the plug on their websites and await the updates, under the motto: It is better to be down than to be hacked.

Why we took the websites offline

Given that PHP is so interwoven in practically all of our customers’ systems, not even mentioning our own, the risk was simply too big. Staying online would have been a form of Russian roulette.

Next to that, we already saw all government outlets in the Netherlands, one of the major news outlets and many other hosters taking their websites offline. Although we like to make our own decisions, we also cannot be fully oblivious to the public opinion rising from this. We already received concerned e-mails from many customers, and we believe that staying online would have caused many a panic attack as well.

Right here, it is important to realise that the time pressure was huge. We were depending on incomplete information, and we did not have time to fully examine all PoCs.

In hindsight

In the above timeline, we started at 20-10-2026. However, the underlying problems in the code had already been identified during a security audit in 2024.

At that point, fixing it stalled due to a lack of resources, because the PHP foundation runs on a shoestring budget. (In 2025, they spent no more than 765.000 USD). That combined with uncertainty on how to fix it, and no indication that this could actually be abused by an attacker meant that no real attempt at closing this gap was made at that point.

On the 11th of August this year, the vulnerability was brought up again by a researcher, and now the urgency to fix it increased significantly. Since then the PHP developers have been racing to fix this vulnerability and to coordinate the release of the update.

In hindsight, the problem was not half as big as feared.

The first reports of this vulnerability being abused successfully by hackers “in the wild” were only seen on the 24th. That is 3 days after the release of the update, which is almost three hundred times the 15 minutes that were feared.

The PoCs that were being shared on the 21st, that claimed to show examples of this vulnerability being abused, turned out to be ineffective. In many cases these PoCs were written with AI tools as expected, but these PoCs were also tested by the same AI-tool. In something similar to laboratory circumstances the AI sets up a test server to hack, and then runs the PoC against that server. These test servers are often set up by AI with extra unrelated vulnerabilities, which means the PoC is not actually effective against any real-world server. This is often called “reward hacking”.

In the meantime there were of course attempts to abuse this vulnerability using these ineffective methods, and of course they showed up in people’s firewalls and logs. None of those were successful until the 24th.

One more itch: The role of AI

The vulnerability was discovered using an AI tool, and the first successful exploit in the wild also used AI-tools. This shows that AI-tools can be useful if questioned from a position of expertise.

At the same time, we also saw that the initial results were off by a pretty long shot, with different AI-tools confirming and reinforcing other AI-tools’ findings. This way they led many companies and organisations to take drastic measures. The developments in AI go very fast and companies have to adjust to the new reality. It is a rapidly changing dynamic and timelines are getting shorter. This requires critical thinking throughout society, and we notice that this has been lacking in this incident.

Closing remarks

The events, and our response, resulted in some conflicted feelings in our team. Yes, there was a real vulnerability, and we had to act on it. Because of our actions, all websites under our control that use PHP have been safe, so we can congratulate ourselves here.

In the meantime, many of our customers’ websites have been down for a few hours, which we would of course have preferred to avoid. As such there is also a feeling of being swept up in an artificial panic.

We also know that big decisions taken under time pressure have the tendency to turn out to be bad decisions. Weighing these points, we believe shutting everything down was the right call to make.

Background: how security problems are normally handled

Since all of this requires a lot of context, we thought this would be a good moment to describe how the process of finding and fixing security problems normally works in the Open Source world.

Normal bug discovery procedure

One of the core ideas of Open Source is that having the code visible to the world allows anyone to look at it, spot bugs and other issues, and file a report to get them fixed. The theory goes that having many eyes on the code will catch more of the potential bugs. This is normally all done out in the open, in bug trackers, mailing lists and issue boards. But when it comes to security issues a different approach is needed.

When a mistake is discovered in the software, that allows hackers to do something they should not be allowed to do, that is called a (security) vulnerability. Posting about this vulnerability in public is not desirable, because that would allow hackers to learn how to (ab)use this vulnerability. That is why for security issues a different procedure is used, these issues are handled behind closed doors.

How vulnerabilities are handled depends on a few different things.

  1. How serious is the vulnerability?
  2. What would the impact of abuse be?
  3. How easy is it (for hackers) to (ab)use it?
  4. How easy is it (for the developers) to fix the vulnerability?

We’ll quickly go over each of these.

1. How serious is the vulnerability

By this we mean: when the vulnerability is successfully used, what does the hacker gain?

At its most serious level an attacker can gain complete control over the system the software is running on. Typically this is described as “shell” when the hacker can gain access to the command-line Linux interface (called shell) on the system, or “root shell” when the hacker can gain access to the shell as the root-user (the root user is the user with full access rights on the system).

Less serious vulnerabilities might involve things like being able to see data you shouldn’t have access to, being able to change values in a form before you submit it, or simply not having the most secure defaults configured. It should be noted that less serious vulnerabilities can often still have a big impact. They can often be used together with other vulnerabilities or techniques to still pose a serious threat or gain full control.

2. What is the impact of the vulnerability

This depends on how many systems run this software, and what these systems are used for.

A vulnerability in webserver software is likely to be much more impactful than a vulnerability in, for example, the software on your e-reader.

If your e-reader even connects to the internet at all, it will usually be from your home wifi, from behind a firewall. In contrast, a webserver has to be connected to the internet at all times, and has to accept connections from unknown devices all the time, this is essential to perform its normal functions.

Your e-reader mostly just stores some books. Theoretically it’s possible that you have something private or valuable there, but unless it’s well known that you have a secret copy of a not yet published book, hackers are not likely to be interested in the data on your e-reader. A webserver on the other hand, can contain much more interesting data. Often storing (too much) data on the websites’ users. And because it is a machine, that is permanently on, and permanently connected to the internet, it can be used for all kinds of hacker-like tasks, like sending spam, hosting phishing pages, attacking other servers, etc.

If a similar vulnerability appeared for e-readers and for webservers, the impact of the one for webservers would be much more serious.

For even more impactful vulnerabilities think about systems running in hospitals, at electricity generation companies, or even just the smart-freezers used by supermarkets (that were recently hacked and set to heat instead of freeze).

3. How easy is it for hackers to abuse the vulnerability

Some discovered vulnerabilities can be abused by even the most novice of hackers. Others require the hacker to develop (or copy from someone else that developed it) a whole separate piece of software. For the more complicated vulnerabilities it can take months for this software to be developed.

But as soon as someone has succeeded at abusing it, that tool is often shared around. If that isn’t just done out in the open, for example on GitHub, it is surely done on private forums and on the dark web by hackers.

If done in the open, it’s often presented as a Proof of Concept (PoC). That is a (usually short) piece of code showing how the vulnerability can be (ab)used. This is intended more as a demonstration to show that the vulnerability is real, than as a guide for how to implement this as a hacker, but inevitably it works for that too.

When a working PoC has been published, or when companies and security firms detect successful abuse of the vulnerability “in the wild” (i.e. on real servers, so not on their own test servers), that also affects the choices made next.

4. How easy is it for developers to fix the vulnerability

Depending on the type of vulnerability, the time it takes to fix it can vary wildly.

If the vulnerability is introduced in some little-used feature of the software, it’s often possible to temporarily deactivate this feature, until the fix has been published. That way the majority of users can still use the software like normal, and only the users that relied on this specific feature have to find a way to work around its temporary absence.

A temporary fix is not always available. When the vulnerability is in the core of the software, and code needs to be adjusted in many different locations, fixing it can take months. In rare cases big changes like that can even introduce incompatibilities, if the software has to be changed too much, code that worked on the old version might be broken in the new version.

In some extreme cases, the vulnerabilities can even be intrinsic to the software that is used, like speculative execution, or prompt injection. It’s possible to make these vulnerabilities more difficult to abuse, but they can never be fully prevented. The only way to be guaranteed to be safe from these types of vulnerabilities is to switch to a different solution.

The life of a security vulnerability

Now with that background in place, let’s see how a vulnerability is typically handled.

Disclosure

A security researcher (also known as a white-hat or ethical hacker) discovers a mistake in the software. They test (if possible on their own systems) that they can indeed gain access to things they should not be able to access. Then they contact the developers, and inform them about the issue.

Hopefully the developers are open to this feedback, they might even have something like a responsible disclosure agreement in place, like we do. From here the developers start their own investigation.

Closed door developer actions

The developers will first assess the legitimacy of the disclosure, trying to replicate the results of the security researcher. Often developers will also see if they can find evidence of the vulnerability being abused. Either in the logs of their own services, or via other security researchers.

Once it is confirmed the vulnerability is real they will start looking at ways to fix it. Either by asking users to temporarily disable the feature that contains it, or by writing an update.

In parallel to this, the developers will often contact a select group of people that work on the software, or work with the software. In this period secrecy is still important, so they are asked to keep this quiet.

For software that is included in a Linux installation, depending on the version of Linux, there are different ways and places to offer this software. To make sure that the update is available as quickly as possible, the people that “package” the software for these places will be informed, so they can prepare the update for release.

In some cases they will also contact the (bigger) users of their software, to prepare them and perhaps to already recommend preventative measures.

Then, depending on the severity of the vulnerability, the developers will publish an announcement, with a description of the problem (still keeping the details vague), and a time and date when they will publish the update.

Publishing the update

Because it is Open Source, as soon as the update is published everyone can simply open up the code, and see what has changed. Looking at what was fixed gives hackers a lot of insight into what was broken.

Publishing the patch is the start of a race.

On the offensive team (black-hat, unethical) hackers will work frantically trying to write code that exploits the vulnerability. Even if that takes a long time, they will likely still be able to hack some machines (after all, some systems never get updated), so they are bound to have at least some success. But if they are really fast, they might be able to infect a lot more machines.

At the same time on the defensive team, system engineers are working just as frantically installing the update on the servers under their control. Sometimes on hundreds or even thousands of servers. Hopefully there was an announcement, and they managed to prepare a bit. And hopefully they have a good setup, and starting the update will be mostly automated for the majority of their servers. But inevitably some systems will require manual work, and some things will break that need to be fixed.