PHP2Shell: The Internet Is on Fire. Again.

Recent critical PHP vulnerabilities have sent developers, myself included, scrambling to patch affected systems. The threats are real, but is the panic justified? A look at PHP2Shell, the security implications, and how years of accumulated technical debt can turn a routine upgrade into an emergency. The Wolf explores why regular maintenance beats dragging decade-old applications into the modern era.

P
PHPWolf

PHP2Shell: The Internet Is on Fire. Again.

If you've been anywhere near the PHP ecosystem lately, you've probably noticed a certain amount of panic.

Critical vulnerabilities. Remote code execution. Emergency security patches. Government advisories. CVSS scores approaching 10.

The internet is apparently on fire, and PHP developers everywhere have been handed a bucket.

I've been hard at work patching a considerable number of websites to the latest supported PHP versions. It's necessary work, although it certainly isn't as simple as changing a version number and calling it a day.

But before we declare the apocalypse and start burying our servers in the backyard, let's look at what actually happened, why it matters, and whether the response is proportionate to the threat.

Spoiler: These are serious vulnerabilities. But serious doesn't necessarily mean the sky is falling.

So, What Actually Happened?

On October 21, 2026, the PHP development team released emergency security updates addressing two critical vulnerabilities:

  • CVE-2026-109618 — Remote code execution through memory corruption during out-of-memory handling.
  • CVE-2026-109619 — Remote code execution through stale internal state and use-after-free conditions.

Both received a CVSS v4.0 severity score of 9.2 out of 10.

The vulnerabilities have collectively been dubbed PHP2Shell, because apparently every major security vulnerability needs a catchy name now.

Without getting too deep into PHP's internals, both issues involve situations where the runtime mishandles memory during request processing.

In one case, PHP can encounter an allocation failure while internal data structures are only partially initialized. Subsequent cleanup may then attempt to use invalid memory.

The other involves internal state continuing to reference memory that has already been freed, potentially allowing a later request to interact with that stale state.

These aren't ordinary application vulnerabilities caused by a developer forgetting to sanitize an input or properly escape a database query. They're flaws in the underlying runtime.

And that's what makes them particularly concerning.

Under exploitable conditions, an unauthenticated attacker may be able to execute arbitrary code on an affected server.

In some configurations, exploitation can occur before the application's own code even begins executing.

Your beautifully written authentication middleware won't be much help if the problem occurs before PHP gets around to running it.

The Wolf finds that somewhat inconvenient.

Why Is Everyone Treating This Like the Apocalypse?

There are legitimate reasons for the urgency.

First, PHP is everywhere.

WordPress, Drupal, Joomla, custom applications, internal systems, e-commerce platforms, and countless other websites depend on it.

When a vulnerability appears in a particular application or plugin, the affected population is generally limited to people using that software.

When the vulnerability exists in PHP itself, the potential exposure is substantially broader.

Second, these vulnerabilities don't necessarily require an attacker to have an account or any legitimate access to the application.

Third, they're not merely theoretical.

Working exploitation techniques have been demonstrated, and exploitation attempts have been observed in the wild. On October 26, CISA added both vulnerabilities to its Known Exploited Vulnerabilities catalogue.

That's a pretty good indication that this is more than an academic exercise.

But there's another ingredient in the apocalypse: the security industry's talent for dramatic presentation.

We've seen headlines suggesting that 70% of the internet is affected.

That figure reflects PHP's enormous presence across the web. It doesn't mean 70% of websites have been compromised, nor does it mean every deployment is equally exploitable.

There is an enormous difference between a vulnerable system, a system that can be reliably exploited, and a system that has actually been compromised.

That distinction tends to disappear when someone discovers that the words "CRITICAL SECURITY ALERT" generate more attention than "Please update your software."

To be fair, the security researchers have done valuable work here. Discovering and responsibly disclosing vulnerabilities of this magnitude is important.

But the subsequent panic can make an already difficult situation substantially more chaotic.

Urgency is justified. Panic is optional.

What Are the Security Implications?

Remote code execution is one of those terms that deserves attention.

If an attacker successfully exploits PHP2Shell, they may be able to execute code within the context of the PHP worker process.

Depending on the server configuration and permissions, this could allow them to access application files, obtain database credentials, manipulate data, install malicious code, or attempt to compromise other services.

That doesn't automatically mean an attacker receives root access or complete control of the server.

The privileges available to the PHP process matter.

A properly isolated application running with limited permissions presents a different risk than a poorly configured server where everything runs with excessive privileges.

Unfortunately, both types of systems exist.

This is also why security needs to be layered.

Keeping PHP updated matters. So do filesystem permissions, process isolation, network restrictions, credential management, and the countless other precautions that are considerably less exciting than a vulnerability with its own website and logo.

Web application firewalls can help identify and block known exploitation techniques, but they aren't a replacement for patching.

A firewall can't guarantee that every possible method of triggering a vulnerability will be detected.

And simply updating WordPress or Laravel doesn't fix a vulnerability in PHP itself.

Different layer. Different problem.

Security would be considerably easier if checking a box in a dashboard fixed everything.

The Patches Are Available. So What's the Problem?

The PHP team released fixes for the supported branches on October 21.

PHP BranchFixed Version
PHP 8.58.5.12
PHP 8.48.4.27
PHP 8.38.3.36
PHP 8.28.2.35

PHP 8.1 and older no longer receive regular security releases from the PHP project, although some operating system vendors provide backported fixes.

PHP 8.2 also reaches end of life on December 31, 2026.

Ideally, applications should already be running supported PHP versions and receiving security updates regularly.

That's the easy part.

The difficult part is dealing with years of accumulated application dependencies, outdated frameworks, deprecated functionality, incompatible extensions, and code written under assumptions that are no longer true.

Upgrading PHP itself might take a few minutes.

Getting an older application to function correctly afterward can be an entirely different exercise.

One removed function can become a fatal error. An outdated dependency can prevent an application from booting. A seemingly harmless change in behaviour can expose problems that have been quietly sitting in the codebase for years.

And when you're dealing with many websites, the work compounds.

Some applications will upgrade without complaint.

Others will behave as though you've personally insulted their ancestors.

The Wolf is familiar with both varieties.

Technical Debt: Pay a Little Now, or a Fortune Later

This brings us to something I've been thinking about quite a bit lately: technical debt.

There's a tendency to treat software upgrades as unnecessary work when everything appears to be functioning correctly.

Why spend time updating PHP, replacing deprecated functions, or upgrading framework dependencies when the application works perfectly fine today?

Because eventually, it won't.

And when that day arrives, the cost of fixing it may be substantially greater than the cost of maintaining it along the way.

Consider an application that was originally developed on PHP 5.6 and hasn't received any meaningful updates in ten years.

Now imagine being told that it needs to run on PHP 8.4 immediately.

That's not a minor security patch anymore.

It's potentially an enormous modernization project involving multiple major language changes, abandoned libraries, incompatible frameworks, and assumptions baked into the application architecture.

The developers who originally wrote it may be long gone. Documentation may be nonexistent. Automated tests may never have been written.

And now everything needs to be fixed at once.

Compare that to an application that has been maintained regularly.

PHP 8.1 to 8.2. Then 8.3. Then 8.4.

Small, incremental changes. Deprecations addressed as they appear. Dependencies kept relatively current. Compatibility problems resolved before they accumulate.

It's considerably easier to troubleshoot a handful of changes than to untangle a decade of them.

Technical debt doesn't disappear simply because nobody is working on it. It accumulates interest.

And unlike financial debt, there's no convenient monthly statement reminding you how much you owe.

The invoice generally arrives at the worst possible moment.

Like when two critical remote code execution vulnerabilities are announced and everyone suddenly needs their decade-old applications upgraded yesterday.

Of course, there are legitimate reasons why upgrades get postponed. Budgets, competing priorities, legacy integrations, and limited resources are realities of software development.

But postponing maintenance doesn't eliminate its cost. It transfers that cost into the future, often with interest and considerably more risk.

An application that hasn't changed in ten years isn't necessarily stable.

It might simply be ten years behind.

And every year that passes makes the next upgrade a little more intimidating.

Regular maintenance is almost always less expensive than emergency modernization.

Not just in developer hours, but in downtime, security exposure, and the risk of breaking functionality under pressure.

The Wolf would much rather replace a few rotten boards each year than discover the entire cathedral needs rebuilding during a fire.

And There's Another Vulnerability

Just when everyone thought the emergency patches were the end of the excitement, the PHP team published another advisory on October 23.

This one concerns CVE-2026-115560, a separate remote code execution vulnerability involving PHP's session upload progress functionality.

Unlike the original two vulnerabilities, exploitation requires an unusual combination of configuration and application behaviour, including switching session serialization handlers at runtime.

That is not a particularly common configuration.

The October 21 patches do not address this additional vulnerability. A fix is expected in the next regular release.

In the meantime, PHP recommends disabling session upload progress where necessary:

session.upload_progress.enabled=0

This mitigation should be applied at the server configuration level, followed by a restart of the affected PHP workers.

It's worth determining whether an application actually uses that functionality before changing anything.

This third issue demonstrates why we should evaluate vulnerabilities based on their actual requirements rather than treating every new CVE as an identical emergency.

Patching Without Breaking Everything

I'm currently spending a considerable amount of time bringing websites onto patched PHP releases, dealing with compatibility problems, and making sure everything still functions correctly afterward.

It is necessary work. I don't particularly enjoy the prospect of leaving known remote code execution vulnerabilities exposed to the internet.

But I also don't believe that indiscriminately forcing upgrades without validation is a sensible approach.

A successful security update should leave an application both secure and functional.

A website that has been upgraded but no longer works is not a successful deployment.

Likewise, a website that works perfectly but remains vulnerable to a known critical exploit is not an acceptable end state.

Both concerns need to be addressed.

My general approach is straightforward:

  1. Identify the PHP versions actually serving each application.
  2. Prioritize vulnerable, internet-facing systems.
  3. Apply the appropriate security updates or migrate to a supported release.
  4. Address compatibility problems and test application functionality.
  5. Restart the relevant services and verify that patched PHP is actually running.
  6. Review logs and monitor for suspicious activity or unexpected errors.

That last part matters.

Running php -v from a terminal doesn't necessarily tell you which PHP version a website is using. Multiple versions can coexist, and the command-line interpreter may not be the one serving web requests.

Likewise, installing an updated package doesn't guarantee that existing workers have stopped running vulnerable code.

And if there's evidence that a system has already been compromised, patching alone doesn't undo the attack.

These are relatively straightforward concepts, but they're easy to overlook when everyone is racing toward the same finish line.

Security isn't measured by how quickly you can declare an upgrade complete. It's measured by whether you've actually reduced the risk.

The Wolf's Conclusion

PHP2Shell deserves to be taken seriously.

Unauthenticated remote code execution at the runtime level is a substantial security concern, particularly for applications exposed to the public internet.

But there's a difference between a measured security response and treating every vulnerability announcement as the beginning of civilization's collapse.

And perhaps more importantly, there's a lesson here about maintenance.

The applications that are easiest to patch today are generally the ones that haven't spent the past decade accumulating technical debt.

Software maintenance is not particularly glamorous. Nobody celebrates when a dependency receives a minor version update or a deprecated function gets replaced.

But those little improvements add up.

So do the consequences of neglecting them.

I'll be spending plenty more time patching vulnerabilities, resolving compatibility problems, and dragging older applications into the modern era.

Because somewhere out there, another PHP application is waiting to remind me that code written ten years ago doesn't particularly appreciate being introduced to modern software.

And somewhere else, another security researcher is probably finding something interesting.

Such is the life of a PHP developer.

Patch the vulnerabilities. Pay down the technical debt. Test the applications. Watch the logs.

And maybe, just maybe, the internet will survive another week.

Awoo.

References and Further Reading