Skip to content
Mohammed Kharbotli

~/blog/what-a-php-security-patch-reveals-about-large-applications

What a PHP Security Patch Reveals About Large Applications

A look at what PHP security updates reveal about maintaining large applications. Explore the challenges of different deployment architectures, legacy environments, containers, background workers, and the importance of knowing what actually runs in production.

A PHP security advisory sounds straightforward. Find the affected version, install the fix, restart the services, and check that the application still works.

What struck me when dealing with a PHP update was how much work could come before installing anything. The web application was easy enough to identify. The workers, scheduled tasks, maintenance scripts, and separate services took more thought.

The deployment setup changed the questions, too. On a traditional server, I’d need to understand the installed packages and running processes. With containers, I’d need to establish which images had been built and where they were running. On managed hosting, I might not be able to make the change myself.

The patch exposed gaps in our understanding of the application. Those gaps interested me more than the installation procedure.

Where does the application actually run?

When someone says an application runs PHP 8.3, I want to know where that information came from.

php -v tells me which executable the shell resolves. It doesn’t necessarily identify the runtime handling web requests. A scheduled script might use another installation, with different extensions or configuration.

In a large application, the more difficult question is what counts as part of it.

The web service is visible. A reporting script on another server or an integration maintained by another team may be easier to overlook. Both can belong to the same business workflow, even if they don’t share a repository or deployment process.

That changed how I thought about an inventory. A list of servers and PHP versions is useful, but I also want to know what work each runtime performs and who owns it. Otherwise, “the application is patched” might mean only that its frontend is patched.

Different setups leave different gaps

An application can have a well-maintained Git repository without having a well-understood production environment.

On traditional servers, PHP and its configuration are managed separately from the application code. Several machines can run the same commit while their runtimes have drifted apart. Git answers which code revision was deployed; it doesn’t describe everything that code depends on.

For applications maintained by copying files or through a hosting panel, recovery can be the bigger concern. If production contains local modifications, do we have a complete copy elsewhere? Do we know which extensions and configuration are required to bring it back?

In some environments, the application files, PHP configuration, and server-specific modifications effectively form one deployment unit, but nobody has a complete record of how they fit together.

I wouldn’t make a Docker migration a condition of patching such an application. But I would take any uncertainty about recovery seriously afterward. The next improvement might be version control, verified backups, or documentation of the existing environment. It depends on where we got stuck.

Containers make the environment easier to package, but they introduce another question: which builds does the application use? The web service, workers, and scheduler may use separate images. A new web image doesn’t establish that the others received the fix.

Kubernetes doesn’t remove that distinction. Separate Deployments and CronJobs can still follow different release paths. The rollout can do exactly what we asked while leaving out a workload we forgot to include.

With managed hosting, the uncertainty shifts toward the provider. Which package contains the fix? Who can deploy it? How do we confirm it happened? A vendor may backport a fix, so the upstream version number alone may not answer those questions.

I wouldn’t rank these setups from old to modern and assume the last one wins. Each makes some facts easier to establish and leaves others dependent on how the team maintains it.

A healthy frontend doesn’t settle the matter

Background processing is where I’d be particularly careful about declaring success.

A shop can serve pages normally while orders remain in the queue. That could point to an old worker, a configuration difference, or a compatibility problem. The health endpoint won’t tell me which.

A complete workflow provides better evidence: perform the action through the web application, then confirm that the background work finishes. It also forces us to account for parts of the system that aren’t visible in a browser.

Recovery raises a similar distinction. Returning to the previous application revision while keeping the patched runtime is one thing. Restoring the vulnerable runtime is another. I’d want that decision understood before a regression puts us under pressure.

And patching wouldn’t conclude an investigation into what happened while a system was exposed. “The fix is running” and “we found no evidence of compromise” are separate findings.

What I’d change afterward

The PHP2Shell disclosures and the October and November 2026 security releases were the immediate reason to examine these environments. The questions they raised will matter again.

I’d rehearse a runtime-only update during a normal maintenance window, with someone other than the usual deployer leading it. Where do they need help? Finding the worker? Identifying the right package? Restarting the scheduler? Getting approval from the hosting provider?

Those difficulties would guide the next maintenance work. Sometimes the answer is automation. Sometimes it’s a recovery procedure or knowledge that needs to stop living with one person.

This is what maintainability and deployability came to mean in practice for me: understanding enough of the environment to make the change, then being able to get it into production and verify it. Responding quickly depended on having that knowledge beforehand, rather than reconstructing it during the update.

The hardest part of patching a large PHP application often isn’t installing the update. It’s knowing everything that needs updating in the first place.