Two bugs, zero patches
One bug, CVE-2026-109619, uses PHP’s upload-progress tracking to leave a worker’s internals half-dirty for the next request to trip over. The other, CVE-2026-109618, is nastier: when PHP runs out of memory, the cleanup it does on the way out can be steered into running an attacker’s code. Both arrive as ordinary-looking file uploads.
The usual answer is “upgrade PHP.” That wasn’t on the table. The platform was built on PHP 5.6 and the Phalcon framework, and it was scheduled for retirement in a few months. A rewrite to a supported PHP version would have taken longer than the platform had left.
Let the kernel be the bouncer
The upload bug was the easy one. Nothing in the platform used upload progress, so turning it off closed that door outright. While I was in php.ini, I also made PHP refuse session IDs it didn’t create itself. And since it’s impolite to ask an older server its version, Apache and PHP no longer volunteer one.
The memory bug was the fun one. Its trigger is PHP enforcing its own memory_limit, so the advisory suggests turning the limit off. On its own, that just trades one problem for another: now a runaway request can eat the whole server. My fix was to move the ceiling below PHP. Apache now runs inside a Linux memory cgroup, so when a request gets greedy, the kernel kills that one worker outright. PHP never gets to run the cleanup the exploit depends on, and Apache carries on serving everyone else.
Never trust a safety net until you’ve done a swan dive. So on two non-production servers, I deliberately ran a process out of memory inside Apache’s cgroup. Both times the kernel killed it just short of the limit, and Apache didn’t even restart. Only then did PHP’s own memory cap come off, and only for web requests. The background workers read the same php.ini and run outside the cgroup, so they kept their limit.
Looking back
If you can’t move out, you can at least lock the doors. Moving to a supported PHP was the real fix, and it wasn’t going to happen five months before the lease ran out. So I looked at what each bug needed instead. One needed a feature nobody was using, and the other needed PHP to be the one enforcing its own memory limit. Take those away and the bugs are still in there, with nothing to do. It isn’t as satisfying as a patch, but a platform with five months left needs to be safe for five months, and that’s a different problem with a much cheaper answer.