Two critical PHP bugs, one green scanner
PHP2Shell (CVE-2026-109618 / CVE-2026-109619) is unauthenticated remote code execution in PHP core, CVSS 9.2 apiece, fixed October 21, 2026. A patch runbook for PHP-in-Docker (WordPress, Laravel, custom), interim mitigations that actually apply — and what we learned when our scanner reported 1,783 findings on a vulnerable image and none of them were about PHP.
Pinhaul Crew
October 21, 2026 · 8 min read
Details of two critical vulnerabilities in PHP itself leaked on October 20, a day ahead of coordinated disclosure, and PHP shipped the fixes today, October 21. The pair — CVE-2026-109618 and CVE-2026-109619, nicknamed PHP2Shell — is unauthenticated remote code execution over plain HTTP requests, CVSS v4.0 9.2 apiece. If you run PHP anywhere in Docker — WordPress, Laravel, something homegrown — today's move is simple: rebuild on a fixed release and restart every worker. Below is the runbook, plus the uncomfortable thing we found when we pointed our own scanner at a vulnerable image: 1,783 findings, and not one of them about PHP.
Update, October 22: the runtime detection described below is live in the Pinhaul agent (current release 0.4.0, from our own registry). Agents on older versions are told to update in their next heartbeat; the install command is on your account page.
We are Pinhaul; this blog is our field notes. We spend our days watching other people's runtimes and containers, which makes a day like today two jobs: get builders patch instructions fast, and test what our own tooling actually sees. Both halves are in this post. The second half stung a little.
What PHP2Shell actually is
Two bugs in PHP's request handling, and neither needs credentials or an application flaw — the vulnerable component is the language runtime your app sits on.
- CVE-2026-109618: an out-of-memory condition can interrupt PHP while request data is only partly initialized. Request cleanup then treats the invalid data as valid.
- CVE-2026-109619: request-owned internal state survives after its memory has been freed. A later request on the same worker uses that stale state before normal initialization resets it — in plain terms, a use-after-free that crosses request boundaries: what one request leaves behind, the next request inherits.
Beyond code execution, researchers demonstrated unauthenticated disclosure of PHP worker memory — which can expose passwords, auth tokens and API keys held by that worker. Worth sitting with for a second: even where RCE doesn't land, what's in the worker's memory can leak out.
Affected versions run from PHP 5.4 through 8.5.11, and the at-risk list covers the serving modes people actually use: PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed. If you serve through Apache mod_php, treat yourself as the front of the queue: PHP reports an exploit that triggers before application code runs — your framework and your auth middleware never get a say. PHP-FPM looks safer than it is: its startup behaviour blocks one specific out-of-memory path, but session-lifecycle RCE was still validated against it under suitable application conditions. FPM shops patch too.
| Branch | Fixed in |
|---|---|
| PHP 8.5 | 8.5.12 |
| PHP 8.4 | 8.4.27 |
| PHP 8.3 | 8.3.36 |
| PHP 8.2 | 8.2.35 |
| PHP 8.1 and older | no upstream fix — move to 8.2+ or a vendor backport |
PHP 8.1 and older are outside upstream support. PHP published limited source backports for 7.4, 8.0 and 8.1; for those, get a fixed build from your distro or vendor, or plan the move to 8.2+. One trap worth naming: distro packages may carry backported fixes under older upstream version numbers, so a version string alone doesn't tell you whether you're patched — read your distro's advisory.
Threat reality, without the sirens
Here's the observed picture as we write. Cloudflare has reported attack traffic targeting the flaws, including attempts to evade its protections. CISA said it had not observed exploitation at the time of its alert. Huntress reported seeing none in its partner base as of the morning of October 21. The working summary: attack traffic observed, confirmed compromises not yet public. Patch like it's urgent, because the details have been circulating since the leak — but don't assume you're already too late.
The patch runbook, Docker edition
There is exactly one fix: run a fixed PHP. Everything below is just the order of operations.
- Bump the base image tag. The official
phpimages are pinned by tag, so a fixed PHP means a fixed tag —php:8.4.26-apachebecomesphp:8.4.27-apache, and so on per the table above. If your image builds onwordpressor a framework image, note that wordpress and many framework images build on the official php image — rebuild everything in your chain that isFROMan unfixed base. - Pull, rebuild, recreate. New images on the host aren't new containers until you recreate them:
docker compose pull && docker compose up -d --build
Then restart every PHP worker — a running worker keeps serving the old binary until it's restarted. And verify the right PHP: php -v may report a different PHP than the one serving requests, so check inside the container that actually serves traffic, not on your laptop and not in a sibling container.
If you can't rebuild today
These settings reduce exposure. None of them makes an unpatched system safe — they buy time, they don't close the hole.
Against CVE-2026-109619, disable the session upload progress machinery. It has to be set in php.ini, the FPM pool, or the server config — not via ini_set(), not via an FPM .user.ini — and then all workers restarted. On PHP 8.5, also set fatal_error_backtraces=0.
; php.ini, FPM pool, or server config -- then restart all workers
session.upload_progress.enabled = 0
; PHP 8.5 only:
fatal_error_backtraces = 0
Against CVE-2026-109618, make the out-of-memory condition harder to reach:
post_max_size=8M— or32Mif you genuinely need uploads — withupload_max_filesizeset below it.- Enforce request-size limits at the proxy or web server, and make sure they cover requests without a usable
Content-Length. - If your app doesn't use multipart requests, block them before they ever reach PHP.
- Lower
max_input_nesting_level. - Put a memory limit on the container (cgroup), so out-of-memory conditions hit a wall you chose rather than the host's.
PHP also lists setting memory_limit=-1 administratively, and it's worth quoting the tradeoff: it swaps an out-of-memory crash for resource-exhaustion risk. If you go there, treat it as a watched, temporary setting.
On PHP-FPM, pm.max_requests=1 optionally limits each worker to a single request — brute force, but it shrinks the window for state to carry from one request to the next on the same worker. And if patching will genuinely take days: restrict public access to the service (VPN, allowlist) or isolate it from everything it doesn't need to touch. After you have patched, restore a finite memory_limit and re-read every emergency setting you touched — configs changed in a hurry have a way of becoming load-bearing.
Then we pointed our own scanner at it
Our agent runs Trivy; today's tests were on 0.75.0 with that day's vulnerability database. We scanned the official php:8.4.26-apache image — 8.4.26 is vulnerable, the fix is 8.4.27. The result:
image: php:8.4.26-apache (vulnerable -- fixed in 8.4.27)
reported: 1,783 vulnerabilities -- all in Debian OS packages
reported for PHP itself: none
One thousand seven hundred and eighty-three findings, every one of them in Debian OS packages, and nothing — nothing — for the vulnerable PHP sitting right there in the image. The reason is structural, not a Trivy bug: the official language images compile PHP from source into /usr/local, so no package database records it, and image scanners have no package record to match advisories against. This is also how most people run PHP in Docker — including the official wordpress image, which builds on that same base.
Distro-packaged PHP told the opposite story, with its own catch. Debian trixie's packaged php8.4 had already shipped 8.4.27 — patched — the same day. But an older Debian php8.4, at 8.4.16, showed older PHP CVEs and not these two: the scanner's database, updated that afternoon, didn't contain them yet. Distro-packaged PHP gets detected once distro trackers feed the scanner database, and that lag is typically a day or more. And Alpine 3.22's packaged php84, still at 8.4.16, scanned clean — zero vulnerabilities reported.
On day one, “my scanner is green” did not mean “my PHP is patched.”
What we changed because of it
Live now in the Pinhaul agent:
- The agent reads declared runtime versions. Official
php,nodeandrubyimages setPHP_VERSION,NODE_VERSIONandRUBY_VERSIONin the image config, and images built on them inherit those values. The agent reads only those allowlisted keys, and only a version-shaped value ever leaves the host — the rest of the image environment, which can hold secrets, never does. - The backend checks runtimes against a runtime-advisory table with per-branch fixed versions. On a day like today,
php 8.4.26gets two critical findings pointing at 8.4.27, an EOL branch like 8.1 is pointed at 8.2.35, and the findings close on their own once the container is rebuilt on a fixed version. This works the day an advisory lands, without waiting for any scanner database. - Runtimes are now part of project inventory. Our curated intel feed can target
phpdirectly when the next zero-day lands, and end-of-life checks now cover PHP, Node and Ruby — so PHP 8.1 and older get flagged as end-of-life instead of silently aging out.
And the gap we won't pretend we closed: PHP installed from a distro package — Alpine's apk add php84, say — declares no version for the agent to read, so detection there still depends on the scanner database catching up. The agent update closes the blind spot for the way most people actually run PHP in Docker; the long tail still waits on the feeds.
Where we're reading
- CISA's alert on the PHP vulnerabilities
- Qualys on the critical security release
- Google Cloud's response write-up
- Huntress on PHP2Shell
- NCSC's advisory
Patch, restart your workers, and trust the version string inside the serving container over any scanner — ours included. If that's the kind of runtime-aware watching you want on your stack, the waitlist is here.
Want this watching your stack?
Every engine in this story runs nightly for the teams on Pinhaul. Join the waitlist — we onboard a few builders every week.