php2shell: the patch is out, here is what PHP logs can show you
[21-Oct-2026 17:36:28] WARNING: [pool www] child 212626 exited on signal 11 (SIGSEGV - core dumped) after 1.499379 seconds from start
That line comes from the error log of a PHP-FPM instance I set up this afternoon in a Debian 12 container. A worker died on a segmentation fault, the master spawned a replacement, and the application kept serving. Nobody usually reads that line. As of 14:00 UTC today, I think you should.
The PHP Group shipped the fixes for CVE-2026-109618 and CVE-2026-109619 right on schedule. These are the two bugs nicknamed php2shell, whose details leaked the day before. The advisories are now on GitHub, with root causes, exposed configurations and specific mitigations. We can finally stop guessing.
Update, October 22. A few things have moved since the first version of this post. Calif’s technical write-up is now public, and it changes what you hunt for, because a successful exploit does not crash the worker. Amazon disclosed an exploitation attempt as early as October 17, four days before disclosure. And Debian patched bookworm the same evening, where I had seen it still vulnerable while writing. I’ve reworked the affected sections and the timeline.

What the advisories say, minus the noise
Two bugs, two different root causes, same CVSS v4 score of 9.2.
CVE-2026-109618 (advisory GHSA-w8hw-w9fx-j79w, “RCE via OOM corruption”). When PHP runs out of memory, it bails out of the current context with longjmp(). If that jump happens while the request is still being initialized, some structures are left half-built, and end-of-request cleanup treats them as valid. The advisory explains that multipart parsing offers several ways to hit the memory limit without exceeding any declared limit, and that full code execution was validated against mod_php with default memory settings, unauthenticated.
CVE-2026-109619 (advisory GHSA-6wmf-4rv5-p3rp, “RCE via stale global state”). A use-after-free: some global worker state keeps pointing at memory that belonged to an earlier request. A later request handled by the same worker can use it before normal initialization resets it. The two paths the advisory confirms are fatal_error_backtraces on PHP 8.5 and session.upload_progress. The advisory also lists memory disclosure as a confirmed impact: without running any code, an attacker can read fragments of other requests’ memory (passwords, tokens, keys). In that case nothing spawns a shell, so the process-lineage rule further down sees nothing; the memory error and the request shape are your only witnesses.
Fixed versions: 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Branches 7.4, 8.0 and 8.1 get no official release, but the PHP Group pushed minimal backports to branches in the php-src repository for people who build from source. Every SAPI that serves web traffic is affected (FPM, mod_php, php-cgi, FrankenPHP, LiteSpeed), with mod_php at the top of the list.
The advisory credits four GitHub accounts. Two teams found the bugs independently. Calif (Ryan Austin) got there first, on August 1, under OpenAI’s Patch the Planet program, reported on the 11th, with an RCE PoC the PHP Group confirmed on the 15th. Wiz found the same bug on August 19 with Wiz Atlas and AI models, and reported it on the 24th. Calif’s write-up notes the oldest vulnerable path dates back to PHP 5.4.0, twelve years of exposed code.
The October 20 leak didn’t really shrink the patch window: we now know someone already had a working exploit before it, since Amazon saw an attempt on October 17 (more on that below). What it did was put the details in everyone’s hands at the same time.
Exploited or not?
Yes, and the picture has sharpened since the fix shipped. The clearest signal comes from Amazon: its MadPot honeypots logged an exploitation attempt on October 17, four days before disclosure, from a commercial anonymization network. Nobody knows yet how the attacker had the information during the embargo, but the fact stands. Since the 21st, Amazon has observed further waves, with payloads and infrastructure that point to multiple actors, and describes exploitation as broad in the wild. watchTowr saw the same on its honeypot network on the 21st. Cloudflare, for its part, had rolled out WAF rules at 03:02 UTC, before the fix, and its CTO spoke of “early attacks.”
Two caveats. The PHP Group says it found no functional exploit among the PoCs circulating at release, and Tenable couldn’t verify the public code. But Calif’s full write-up is now online, with a demo against Nginx + PHP-FPM, so the technical bar has dropped. As for CISA, neither CVE is in the KEV catalog as I write this (latest catalog version: October 21, 14:04 UTC).
My take hasn’t changed, it’s hardened: I treat any exposed, unpatched PHP server as already targeted, and I go back through the history to October 17, not just to the leak, since that’s Amazon’s recommendation.
What a crashing worker writes to the logs
Both bugs are memory corruption, and Calif’s write-up changes how you look for them. The key point: a successful exploit does not crash the worker. Under mod_php, the worker absorbs the fatal and carries on; under PHP-FPM, the exploitable path (via session.upload_progress) also leaves the worker alive for the next request. The segfault is the failed or noisy attempt, not the success. Still worth seeing, but it’s not the signal that proves a compromise.
The signal that really sits on the attack path is the memory error. Hitting memory_limit at the wrong moment is part of the CVE-2026-109618 technique: the attacker drives PHP to OOM with a multipart request built for it. So an Allowed memory size … exhausted line on an exposed host isn’t just an app bug, it’s exactly what the first flaw triggers.
Wiz lists its own detection leads: unusual multipart requests followed by memory-limit errors or repeated HTTP 500s, unusually large or malformed PHPSESSID cookies in responses, and unexplained worker churn. Calif’s write-up spells out what the request looks like, which gives real hunting leads in access logs and WAF: a multipart POST with Transfer-Encoding: chunked (or HTTP/2 with no Content-Length) to bypass post_max_size, hundreds of empty file parts (filename="") with nested names like files[a][b][c]…, then a second multipart request aimed at upload progress. All of that shows up in logs most SOCs already collect, or could start collecting in ten minutes.
I wanted the exact lines rather than a guess. In the lab (Debian 12’s PHP 8.2.34, so a vulnerable build), I triggered a memory error with a script that over-allocates, then killed workers by hand with kill -SEGV and kill -ABRT. I did not replay any exploit; the point is to know what the lines look like, not to reproduce the attack. Same thing with Apache and mod_php.

A few things stand out.
FPM and Apache don’t say the same thing. FPM writes exited on signal 11 (SIGSEGV - core dumped); Apache writes AH00052: child pid … exit signal Segmentation fault (11). A search that only knows one format misses half your servers.
The Allowed memory size … exhausted error only lands in the FPM log if catch_workers_output is on (or if log_errors points there). On plenty of setups it ends up in the application’s own PHP log, or nowhere at all. Worth checking where yours goes before you need it.
And look at the timestamps: 17:36 in the log, when it was 15:36 UTC. FPM logs in the server’s local time zone, and so does Apache. If your SIEM doesn’t normalize that, your correlation with WAF or proxy logs will be two hours off.
Two rules: one borrowed, one new
SigmaHQ has had an Apache rule since 2017, web_apache_segfault.yml, which looks for exit signal Segmentation Fault. The capital F doesn’t match the real line (lowercase “fault”), but Sigma keywords are case-insensitive by default and the usual backends follow suit, so it still fires. No need to rewrite it.
I couldn’t find an equivalent for FPM, so here’s mine. I tested it against the lab lines, including an exited with code 0 line from normal worker recycling that must not match:
title: PHP-FPM Worker Crashed on a Memory Error Signal
id: 5b1e7c3a-2f8d-4e6b-9a0c-3d4f5e6a7b8c
status: experimental
description: |
Detects a PHP-FPM worker exiting on SIGSEGV or SIGABRT, as written by the FPM master
in its error log. Exploitation attempts against CVE-2026-109618 and CVE-2026-109619
(memory corruption in PHP request handling) can crash workers. A crash on an
unpatched host exposed to the internet deserves a look at the requests received
just before it.
references:
- https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
- https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
author: Chabnco (PurpleLog)
date: 2026-10-21
tags:
- attack.initial-access
- attack.t1190
logsource:
product: linux
service: php-fpm
definition: 'Requirements: collect the PHP-FPM master error log (error_log in php-fpm.conf)'
detection:
keywords:
- 'exited on signal 11 (SIGSEGV'
- 'exited on signal 6 (SIGABRT'
condition: keywords
falsepositives:
- Buggy PHP extensions or OPcache issues that crash workers independently of any attack
level: medium
service: php-fpm isn’t a standard SigmaHQ log source, so you’ll have to map it to however you ingest that file. And medium is on purpose. A one-off segfault can come from a flaky extension. What should kick off a real investigation is a run of crashes on an exposed, still-unpatched host, especially if the access logs show bursts of multipart POSTs to the same page at the same time.

A crash is the failed attempt. A successful one doesn’t crash anything; it runs, and the worker survives, so the Apache rule above sees nothing on a clean mod_php exploit. For that, you go back to what the worker does next. A php-fpm, or an apache2 running mod_php, that launches a shell or a download tool is still the most reliable signal. While testing, I hit a false positive worth excluding up front: PHP’s mail() goes through sh -c /usr/sbin/sendmail -t -i.
title: PHP Worker Process Spawning a Shell or Download Tool
id: 7f3c1e2a-9b44-4d6e-8c2f-1a2b3c4d5e6f
status: experimental
description: |
Detects a PHP SAPI worker (php-fpm, php-cgi, mod_php) spawning an interactive
shell or a download utility. This is the expected post-exploitation behaviour of
a PHP RCE such as CVE-2026-109618 / CVE-2026-109619, where the attacker turns
code execution into a command shell on the host. The parent match uses a contains
on "php" so that versioned binaries such as php-fpm8.2 are covered.
references:
- https://www.huntress.com/blog/php2shell-leaked-critical-php-vulnerabilities
- https://sansec.io/research/php2shell
author: Chabnco (PurpleLog)
date: 2026-10-21
tags:
- attack.execution
- attack.t1059.004
- attack.initial-access
- attack.t1190
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|contains: '/php'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/zsh'
- '/curl'
- '/wget'
- '/python3'
- '/perl'
- '/nc'
- '/ncat'
filter_sendmail:
CommandLine|contains: '/sendmail'
condition: selection_parent and selection_child and not filter_sendmail
falsepositives:
- Applications that legitimately shell out (imagemagick wrappers, backup or deploy scripts, some CMS plugins)
- Mail delivery via sendmail, excluded above
level: high
One limitation to know about: under mod_php, the parent is /usr/sbin/apache2, which doesn’t contain /php. If you run mod_php (the most exposed setup, as it happens), add /apache2 and /httpd to the parent selection, knowing you’ll also catch CGI scripts and whatever else Apache launches for other reasons.
Checking that a server is really patched
This is where I expect the most false confidence this week.
When I set up the lab, my Debian 12 container was at 8.2.34-1~deb12u1 and the security tracker still listed it as vulnerable: “up to date” didn’t mean fixed. Debian has since caught up, the same evening. Bookworm moved to 8.2.35-1~deb12u1 (DLA-4848-1, via the LTS team), and trixie to 8.4.27-1~deb13u1 (DSA-6574-1). So an apt-get update && apt-get upgrade on a current stable Debian now pulls the fix. The lesson holds: on disclosure night, check the package version actually installed, not when you last ran apt update. When I wrote the first version, the “up to date but vulnerable” window was real, and it still exists for forky (8.4.26-1, still vulnerable in the tracker).
The reverse trap: distributions that backport fixes without bumping the upstream version (RHEL and its rebuilds, among others) can show php -v below 8.2.35 on a patched package. The only check you can trust is the package version against your distro’s security advisory, not the number PHP prints and not the X-Powered-By header.
And the fix only takes effect once the workers restart. An apt upgrade without restarting PHP-FPM or Apache leaves the old code running in memory.
Mitigations, if you can’t patch tonight
The advisories list several, and one is a surprise: for CVE-2026-109618, set memory_limit=-1 via php_admin_value. It sounds wrong, but the reasoning holds. The bug fires when PHP hits its memory limit at the wrong moment, so you take away that predictable limit and let a cgroup or the container enforce the ceiling instead. The advisory specifically warns against RLIMIT_AS and RLIMIT_DATA, which lead straight back to the vulnerable path. Add a tight post_max_size and limits on request size, multipart part count and header count at the reverse proxy.
For CVE-2026-109619: session.upload_progress.enabled=0, fatal_error_backtraces=0 on PHP 8.5, then restart the workers. The advisory also mentions pm.max_requests=1, which kills each worker after a single request. No leftover state to reuse, but a performance hit I’d only take as a last resort.
The PHP Group says it plainly: these settings lower the risk, they don’t make an installation safe. Help Net Security reports that the UK’s NCSC recommends taking offline anything that can’t be updated.
What I’d do, in order: list exposed PHP hosts and the actual package versions, patch and restart whatever you can, apply the mitigations to the rest. Then go back through the history to October 17 (the date of Amazon’s first observed attempt) and look on those hosts for Allowed memory size … exhausted errors, bursts of HTTP 500s on endpoints that run session_start() or unserialize(), and the abnormal multipart POSTs described above. Worker crashes come after that: a successful attempt crashes nothing, but a run of segfaults on a server that never had any is one I’d still open.
References
- GHSA-w8hw-w9fx-j79w, RCE via OOM corruption (CVE-2026-109618)
- GHSA-6wmf-4rv5-p3rp, RCE via stale global state (CVE-2026-109619)
- php.net, October 21, 2026 security release announcement
- Calif, php2shell technical write-up
- Wiz Research, PHP2Shell
- The Hacker News, exploitation attempt four days before disclosure
- Cloudflare, WAF protections against php2shell
- Tenable, php2shell FAQ
- Debian security tracker, CVE-2026-109618
- Help Net Security, PHP2Shell patched
- SecurityWeek, PHP2Shell: Mass Exploitation Looms
- VirusTotal, Sizing the PHP exposure window
- SigmaHQ, Apache Segmentation Fault rule