nativephp/mobile 4.6.1 and nativephp/mobile-file 1.0.3. Six of the seven name RedEye Security as the party that reported them, with the research credited to acd421 and this page linked as the write-up. We reported privately on October 24; the fixes published the next day. That is the coordinated disclosure path working as intended, and it is why we kept exploit detail out of the reports.- GHSA-9884-fw9c-mq85 high 8.1Web view pages can drive the async task bridge, leading to code injection
- GHSA-7927-vv5p-fv4f high 7.7Web-view-reachable File.Move / File.Copy take unconfined paths, allowing file exfiltration and clobbering in the app sandbox
- GHSA-3w4w-cchh-qvrw high 7.7File.Move and File.Copy accept unrestricted filesystem paths
- GHSA-83jv-8h7x-287p high 7.7Arbitrary object instantiation via the /_native/api/events endpoint
- GHSA-9g37-88p8-75j2 high 7.4Async task payloads are deserialized without authentication
- GHSA-76px-r497-93p9 medium 5.9Path traversal in the /_assets static asset handler
The seventh advisory, GHSA-27jx-7m9x-fx5c, came out of the same review and is not attributed to our report. PHP core and Ubuntu have not yet shipped fixes for the paths we sent them, and no CVE IDs are assigned to the NativePHP set yet. We will update this page as those land.
- What: PHP's October 21 releases fixed two critical PHP2Shell RCEs (CVE-2026-109618 and CVE-2026-109619). A third path, CVE-2026-115560, remained unpatched. New independent research reports further weaknesses that survive those releases.
- Status: The October 21 releases were not the end of it. These are new, public zero-days with working exploit code already out. NativePHP shipped fixes on October 25 (
mobile 4.6.1,mobile-file 1.0.3) across seven advisories, six of which credit our report. PHP core and Ubuntu have no fix yet, so exposed systems there remain at live risk and should be treated as an emergency. - Where: Additional session and serialization weaknesses in PHP core, a Windows-specific file-handling path, a framework-level path in NativePHP apps, and stock PHP on Ubuntu 22.04 LTS where the October package update has not been applied.
- Mitigation: Keep the October 21 fixes in place. Setting
session.upload_progress.enabled=0reduces exposure on one path but does not close every path, so it is a stopgap, not a complete fix. The full fixes are the upstream releases still to come. - Who is at risk: PHP sites, Ubuntu 22.04 LTS hosts still on the unpatched package, and NativePHP mobile apps. Apply each vendor's fix as it ships.
On October 21, PHP shipped an emergency release that closed the two critical remote-code-execution flaws known as PHP2Shell, CVE-2026-109618 and CVE-2026-109619. A third path, CVE-2026-115560 in the session upload progress feature, was acknowledged and left without a fixed release. We wrote about that gap and said part two was coming. This is it.
The picture has changed hard since we first wrote: a new wave of zero-days has dropped, the research is public, and it ships working exploit code that anyone can pick up today. The most serious items are unauthenticated remote code execution, which means an attacker needs no login, no credentials, and no foothold to run commands on an exposed server. That is as bad as a web flaw gets. With exploit code in the open and no vendor fix to apply, the window to get ahead of this is already closing, even though CVE assignment and full vendor confirmation are still pending. If you run PHP anywhere on the internet, assume you are in scope until you have proven otherwise.
What the research shows
The work is the researcher acd421's. They took the October patch apart and kept going, and the result is not a rehash of the two bugs that were fixed, it is a fresh set of zero-days that survive the current releases across four fronts at once. The findings fall into four groups:
- PHP core. Further weaknesses in how PHP handles sessions and how it serializes and unserializes objects, reachable on builds that are otherwise current.
- Windows PHP. A file-handling path specific to PHP on Windows.
- NativePHP. A framework-level path in NativePHP mobile apps, independent of the PHP-level settings above, because it sits in the app framework rather than in PHP itself.
- Ubuntu 22.04 LTS. Stock PHP on that release stays exploitable to root where the October package update has not been applied, independent of the upstream source patch.
This wave does not stop at theory. The disclosure publishes working exploit chains and the receipts to go with them: remote code execution demonstrated against a current, fully patched PHP 8.5.12 build, against a live internet-facing WordPress host over plain HTTP, root on a stock Ubuntu 22.04 LTS install, a NativePHP app bridge driven to full control, and a zero-privilege webshell on stock Windows. Several of the memory-corruption paths rate at the top of the CVSS scale. The exploit code is turnkey and public, which is what collapses the distance between a disclosed bug and mass exploitation.
These are researcher-reported and, at the time of writing, not all vendor-confirmed. The full technical detail sits with the researcher's own disclosure: acd421's public disclosure. We are not reproducing exploit detail here.
What to do while fixes land
- Keep the October 21 PHP fixes (8.2.35 / 8.3.36 / 8.4.27 / 8.5.12) in place. Nothing here is a reason to roll them back.
- Treat
session.upload_progress.enabled=0as a stopgap on one path, not a complete mitigation, and plan to apply the upstream fixes when they ship. - If you run Ubuntu 22.04 LTS, check your PHP package level. Hosts still on the pre-fix package are exposed to the original class, so prioritize that update.
- If you ship a NativePHP mobile app, review how the app bridge exposes privileged operations and where it unserializes data it did not produce.
- Let PHP's own corruption reports reach your logs. In each php-fpm pool set
catch_workers_output = yes, and seterror_log = syslogfor the master. Without them a worker'szend_mm_heap corruptedor glibc abort is written nowhere. - On hosts that can spare some speed, start php-fpm with
USE_ZEND_ALLOC=0in its service environment and a hardened allocator such as Scudo or hardened_malloc loaded. Many heap corruption bugs then end in an immediate, logged abort instead of a state an attacker can build on. - As a general measure, do not unserialize data from an untrusted source, and watch for PHP, Canonical, and NativePHP security updates over the coming days.
How Caver and Carbide catch this
These are memory corruption bugs, and seeing the corruption itself inside a running PHP worker would take instrumentation nobody runs in production. We do not claim to. What every one of these chains has to do, before and after the corruption, is visible, and that is where Caver and Carbide, RedEye's EDR, work.
Before: the attempt crashes workers. Exploiting a PHP memory corruption bug means shaping the heap and guessing at memory layout, and a wrong guess kills the worker. A healthy PHP host rarely loses a worker to a crash. Caver raises a crash burst, three or more PHP worker crashes on one host in fifteen minutes, from the kernel's segfault and general protection lines, systemd-coredump, and php-fpm's own exited on signal log. On hosts running Carbide, the agent now records the crash on the endpoint itself, with the terminating signal, straight from the kernel's process-exit hook, so this works even where the host ships no logs at all.
The corruption itself, when the runtime catches it. No one sees the corrupting write, but the runtime sometimes sees the damage it leaves. PHP's own memory allocator aborts with zend_mm_heap corrupted when it finds a damaged internal list, glibc aborts with messages such as double free or corruption, and the stack protector aborts with stack smashing detected. Each of those is memory corruption caught in the act, a stronger signal than a crash of unknown cause, and Caver raises a detection on the first one from a PHP process. They only reach your logs if php-fpm forwards its workers' output, which is the first hardening step below.
After: the worker starts something it never should. Carbide records every process start on Linux with its parent. A php-fpm, php-cgi, mod_php, FrankenPHP or LiteSpeed worker launching a shell, a scripting interpreter, curl or wget, netcat, or a command line carrying a reverse shell marker raises a high severity detection on that host. Both detections score on the same host, so a crash burst followed by a spawned shell adds up to one alert instead of two unrelated ones.
The webshell lands. After code execution, the usual next step is a webshell, and the exploited PHP worker writes it itself. Carbide records every file created or renamed on the host with the process that did it, so a php-fpm or Apache worker writing a .php, .phtml or .phar file into a web root raises a high severity detection. Deployments write code as a deploy user, not as the web server's PHP worker, which is what makes the signal clean. It scores on the same host as the crash burst and the spawned shell.
Running from memory, with no file to find. A later stage often skips the disk entirely: the payload is written into an anonymous memory file and run straight from it, so there is no dropped binary for a file scan to catch. Carbide flags a process launched from a memory file descriptor (a memfd, or a /proc file-descriptor path), which is the fileless-execution step itself, whatever it loads.
Stopping it. A webshell is only useful if the attacker can run commands through it, and every command it runs starts a shell or a tool from the PHP worker. With Carbide's execution control in enforce mode, a rule that denies programs started by a PHP worker kills each of those commands as it starts, and Carbide's separate responder checks the process against the rule on the host before it signals. The webshell can sit on disk; it cannot do anything. From the console an analyst can also cut the host off the network and quarantine the file. On Linux that enforcement is immediate but reactive: a command that finishes in microseconds can still run. It stops the attacker's foothold, not the bug, which is why the patches above still come first.
Update #3, October 24: the full detection pack
CISA revised its PHP advisory on October 23 to add a public Sigma detection rule for this class of activity (CISA alert, last revised 2026-10-23). With public detection now in the open, we are releasing our full set: the same behavioural detection pack we provided to CrowdStrike, rewritten vendor neutral so it drops into any SIEM or EDR. Every rule below shipped in Caver and Carbide first.
The limit stated earlier still holds, and it is worth repeating. None of this sees the memory corruption write itself. That primitive runs inside a worker in a few instructions, and no production monitoring watches it. What these rules detect is everything an exploit has to do around it, across four stages, and what the last stage enforces on is the one step an attacker cannot skip: running a command.
The five stages
A memory corruption exploit against a PHP worker performs the same actions in the same order, whatever the specific bug. Each stage leaves a different trace in a different source, so coverage comes from several weak rules that each add risk to the same host rather than one strong rule that has to catch everything.
| Stage | What happens | Signal | Telemetry |
|---|---|---|---|
| 1. Attempt | Heap shaping and layout guessing, and a wrong guess kills the worker | Three or more PHP worker crashes on one host in 15 minutes | Kernel fault lines, systemd-coredump, php-fpm child exit |
| 2. Corruption caught | The runtime's own integrity checks find a damaged heap or stack | Any one allocator or stack-protector abort | php-fpm forwarded worker stderr, journald |
| 3. Foothold | The exploited worker writes a webshell | A PHP worker creates or renames to .php, .phtml or .phar under a web root, or writes an oversized or misplaced session file | Endpoint file events carrying the writing process |
| 4. Use | Every command through the foothold starts from the PHP worker | A PHP worker starts a shell, interpreter, download or socket tool, or a reverse shell marker | Endpoint process creation with the parent |
| 5. Stop | Kill the spawned command as it starts | Same as stage 4, enforced | Endpoint prevention |
Because every rule scores risk on the same host object, a crash burst, a dropped file and a spawned shell on one machine add up to one high-confidence case instead of three medium alerts. In a SIEM without host risk scoring, group on the host or agent id and treat a stage 1 or stage 2 hit as a severity raiser for a stage 3 or stage 4 hit in the same window.
Matching PHP workers
Linux distributions version their PHP binaries, so match the executable basename with a version suffix, anchored, rather than a fixed name. Anchoring matters: an unanchored php match also catches an unrelated tool under a path such as /opt/phpmyadmin/bin/, which is one of our no-fire test cases.
php-fpm, php-fpm8.3, php-cgi8.2, php, php8.5, lsphp, lsphp83 (LiteSpeed), frankenphp, apache2, httpd (mod_php) regex: ^(php-fpm|php-cgi|php|lsphp)[0-9.]*$|^(httpd|apache2|frankenphp)$
Stage 1: the attempt crashes workers
Exploiting a memory corruption bug means guessing at memory layout, and a wrong guess kills the worker. A healthy PHP host rarely loses a worker, so a burst of crashes on one host is the attempt itself. The base rule matches one crash from the kernel fault line, systemd-coredump, or php-fpm's own child-exit log; the correlation raises on three or more per host in fifteen minutes. SIGTERM (graceful reload) is deliberately not counted.
title: PHP Worker Crashed (Segfault, General Protection, Trap, Core Dump or Fatal Signal)
id: dd831a5d-ef61-40fc-bd4c-70108968c06f
status: experimental
description: |
One PHP worker crash, as written by the kernel (show_unhandled_signals), systemd-coredump, or php-fpm's own
child-exit log. A single crash is weak evidence; this rule is the base for the correlation rule
php2shell_worker_crash_burst, which raises on three or more per host in fifteen minutes. Exploiting a PHP memory
corruption bug means shaping the heap and guessing at layout, and a wrong guess kills the worker.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.initial-access
- attack.t1190
logsource:
product: linux
service: syslog
detection:
keywords_kernel:
- 'php-fpm*segfault at*'
- 'php-cgi*segfault at*'
- 'lsphp*segfault at*'
- 'frankenphp*segfault at*'
- 'apache2*segfault at*'
- 'httpd*segfault at*'
- 'traps: php*general protection*'
- 'traps: apache2*general protection*'
- 'traps: httpd*general protection*'
- 'traps: php*trap invalid opcode*'
keywords_coredump:
- 'Process * (php*) of user * dumped core*'
- 'Process * (lsphp*) of user * dumped core*'
- 'Process * (frankenphp) of user * dumped core*'
- 'Process * (apache2) of user * dumped core*'
- 'Process * (httpd) of user * dumped core*'
keywords_fpm:
- 'child * exited on signal 11 *'
- 'child * exited on signal 6 *'
- 'child * exited on signal 7 *'
condition: 1 of keywords_*
falsepositives:
- A buggy or mismatched PHP extension that segfaults on ordinary requests. That appears as a steady rate across days rather than a burst.
level: low
---
title: PHP Worker Crash Burst on One Host (PHP2Shell Exploitation Attempt)
id: 445b03e3-0d65-48a7-9da8-e38d4d1ff6b0
status: experimental
description: Three or more PHP worker crashes on one host inside fifteen minutes. A healthy PHP host rarely loses a worker; an exploitation run against a memory corruption bug loses several.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.initial-access
- attack.t1190
- cve.2026-109618
- cve.2026-109619
- cve.2026-115560
correlation:
type: event_count
rules:
- dd831a5d-ef61-40fc-bd4c-70108968c06f
group-by:
- host
timespan: 15m
condition:
gte: 3
falsepositives:
- A php-fpm reload or package upgrade that aborts workers mid request. Correlate with the package manager log for the same host.
level: medium
A reliable one-shot exploit stays under a burst threshold. Because a single PHP worker crash is already anomalous, a low-severity single-crash rule makes the one crash visible on its own, to be correlated with the session or request the worker was serving at exit.
title: Any PHP Worker Crash (Single-Shot, Low Severity)
id: c6454454-999d-43e3-bb60-bf8fc2a2817a
status: experimental
description: |
A single PHP worker crash. A healthy PHP host essentially never crashes a worker, so even one is anomalous and
worth correlating with the session or request the worker was serving. This is the low-severity companion to the
crash-burst correlation: a patient attacker who kills a worker once per run never reaches the burst threshold, so
this rule exists to make the single crash itself visible. Pair it in your SIEM with the session file the worker
had open at exit (gap 6) to raise confidence.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.initial-access
- attack.t1190
logsource:
product: linux
service: syslog
detection:
keywords:
- 'php-fpm*segfault at*'
- 'php-cgi*segfault at*'
- 'lsphp*segfault at*'
- 'frankenphp*segfault at*'
- 'traps: php*general protection*'
- 'traps: lsphp*general protection*'
- 'Process * (php*) of user * dumped core*'
- 'Process * (lsphp*) of user * dumped core*'
- 'child * exited on signal 11 *'
- 'child * exited on signal 6 *'
- 'child * exited on signal 7 *'
condition: keywords
falsepositives:
- A buggy or mismatched PHP extension that faults on ordinary requests. Baseline per host; a steady background rate is the extension, a crash tied to one session or request is not.
level: low
Stage 2: the runtime catches the corruption
Corrupting heap or stack metadata trips integrity checks the runtime already performs, and those checks abort with fixed messages. That is memory corruption caught in the act, a stronger signal than a crash of unknown cause. These lines only leave the host if php-fpm forwards worker stderr, which is the first hardening step below.
title: Runtime Integrity Check Reported Memory Corruption (Zend Allocator, glibc malloc, Stack Protector, Hardened Allocator)
id: 53238e99-d569-400a-b423-6e3e86cc4138
status: experimental
description: |
A process aborted because its own integrity checks caught a damaged heap or stack: PHP's Zend allocator
(zend_mm_heap corrupted), glibc malloc (double free or corruption, invalid pointer, corrupted top size and siblings),
the stack protector or FORTIFY (stack smashing detected, buffer overflow detected), or a hardened allocator (Scudo,
hardened_malloc). This is memory corruption caught in the act, the closest production signal to the PHP2Shell
primitive itself. Scope to PHP process names where the log source exposes the program (php-fpm, php-cgi, lsphp,
frankenphp, apache2, httpd). php-fpm forwards a worker's stderr only with catch_workers_output = yes and
error_log = syslog; without them these lines never leave the host.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.initial-access
- attack.t1190
- cve.2026-109618
- cve.2026-109619
- cve.2026-115560
logsource:
product: linux
service: syslog
detection:
keywords:
- 'zend_mm_heap corrupted'
- 'double free or corruption'
- 'free(): double free detected'
- 'free(): invalid pointer'
- 'free(): invalid size'
- 'free(): invalid next size'
- 'malloc(): corrupted top size'
- 'malloc(): memory corruption'
- 'malloc(): invalid size'
- 'corrupted size vs. prev_size'
- 'corrupted double-linked list'
- 'malloc_consolidate(): invalid chunk size'
- 'stack smashing detected'
- 'buffer overflow detected'
- 'Scudo ERROR'
- 'fatal allocator error'
condition: keywords
falsepositives:
- A genuine bug in PHP or a PECL extension corrupting memory on ordinary requests. Still memory corruption and still worth fixing; it repeats on a steady schedule rather than arriving with a crash burst.
level: high
Stage 3: the webshell lands
After code execution the usual next step is a webshell, written by the exploited worker itself, inside a process that is already running, so process-start controls never see it. Deployments write code as a deploy user or a package manager, not as the web server's PHP worker, which is what makes the signal clean. Where the telemetry distinguishes a rename, match the destination: staging under a harmless name and renaming into place is the common variant.
title: PHP Worker Writes a PHP-Executable File Into a Web Root (Webshell Drop)
id: 7bd7fde3-1b02-4ae6-9235-6f5408873ac5
status: experimental
description: |
A PHP worker created a .php, .php5, .phtml or .phar file under a web root. After PHP remote code execution the
exploited worker writes the webshell itself, inside a process that is already running, so process-start controls
never see this step. Deployments write code as a deploy user or a package manager, not as the web server's PHP
worker. Where the telemetry distinguishes a rename, match the DESTINATION path: staging an upload under a harmless
name and renaming it into place is the common variant.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.persistence
- attack.t1505.003
- cve.2026-109618
- cve.2026-109619
- cve.2026-115560
logsource:
product: linux
category: file_event
detection:
selection_writer:
Image|re: '/(php-fpm|php-cgi|php|lsphp)[0-9.]*$|/(httpd|apache2|frankenphp)$'
selection_root:
TargetFilename|re: '^(/var/www/|/srv/|/usr/share/nginx/)|/public_html/|/htdocs/'
selection_ext:
TargetFilename|re: '(?i)\.(php[0-9]?|phtml|phar)$'
condition: all of selection_*
falsepositives:
- CMS self-updates and in-dashboard plugin or theme installs (WordPress, Drupal, Joomla) run inside the PHP worker. Allowlist the host during a known update window, or disable in-dashboard code installs.
- Caching plugins that store pages as .php files under wp-content/cache.
level: high
A session file is an execution vehicle that carries no PHP extension, so the rule above cannot see it. This one flags a sess_ file that is abnormally large or that appears under a web root at all.
title: Oversized or Misplaced PHP Session File (Session as Execution Vehicle)
id: b8e583eb-9bd1-4f0b-815a-90044c5f5529
status: experimental
description: |
A PHP session file (sess_ followed by the session id) that is abnormally large, or that appears inside a web root.
A normal PHP session file is well under 1 KB and lives under the session save_path (commonly /var/lib/php/sessions
or /tmp), never under a web root. An oversized session file, or a session file written where it could be requested
over HTTP, is the session-decode execution vehicle: the webshell lives in the session store rather than in a .php
file, so the extension-based webshell rule does not see it. Tune the size floor to your estate; 4 KB is a safe
starting point well above legitimate sessions.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.persistence
- attack.t1505.003
- cve.2026-115560
logsource:
product: linux
category: file_event
detection:
selection_oversized:
TargetFilename|re: '/sess_[a-zA-Z0-9,-]{20,}$'
FileSize|gte: 4096
selection_in_webroot:
TargetFilename|re: '^(/var/www/|/srv/|/usr/share/nginx/)|/public_html/|/htdocs/'
TargetFilename|contains: '/sess_'
condition: selection_oversized or selection_in_webroot
falsepositives:
- Applications that deliberately store large objects in the session (shopping carts, cached query results). Baseline the per-application session size and set the floor above it, or allowlist the application's save_path.
- A session save_path that is intentionally inside a web root but access-denied at the web server. Confirm the deny rule, then allowlist the path.
level: high
A write to the session store by anything other than a PHP worker is anomalous on its own. Arriving right after a worker crash, it is the signature of a race against the released session lock, so a base rule pairs with a temporal correlation that fires when the write follows a crash on the same host within seconds.
title: Non-PHP Process Writes a PHP Session File
id: 5d671c92-9d76-4b0a-9c76-476d54e32845
name: nonphp_session_write
status: experimental
description: |
A process that is not a PHP worker created or modified a file in the PHP session store (a sess_ file, or any file
under a known session save_path). Session files are written by PHP workers; a write from any other process is
anomalous on its own, and is the base event for the crash-then-race correlation that follows it. On its own this is
a medium signal because backup, antivirus and log-rotation tools legitimately touch the directory; the correlation
is what makes it high.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.t1070
logsource:
product: linux
category: file_event
detection:
selection_sessfile:
TargetFilename|re: '/sess_[a-zA-Z0-9,-]{20,}$'
filter_php_writer:
Image|re: '/(php-fpm|php-cgi|php|lsphp)[0-9.]*$|/(httpd|apache2|frankenphp)$'
filter_known_tools:
Image|endswith:
- '/tmpreaper'
- '/tmpwatch'
- '/systemd-tmpfiles'
condition: selection_sessfile and not 1 of filter_*
falsepositives:
- Backup, antivirus or session-garbage-collection tools that read or clear the session directory. Add them to the filter after confirming they are legitimately deployed.
level: medium
---
title: PHP Worker Crash Followed by a Non-PHP Write to the Session Store (Lock-Drop Race)
id: a1f6b3d2-7c84-4e90-9b1a-2d3e4f5a6071
status: experimental
description: |
A PHP worker crash followed closely by a non-PHP process writing to the PHP session store on the same host. A
write to the session directory by anything other than a PHP worker is already anomalous; arriving immediately after
a worker crash it is the signature of a race against the brief window where the crashed worker's session lock is
released. Tighten the timespan to your telemetry resolution; the race is sub-second, so a short window raises
confidence.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.initial-access
- attack.t1190
- cve.2026-115560
correlation:
type: temporal_ordered
rules:
- c6454454-999d-43e3-bb60-bf8fc2a2817a
- nonphp_session_write
group-by:
- host
timespan: 5s
condition:
gte: 1
falsepositives:
- A crash of a worker that coincides with a scheduled session-cleanup job. Confirm the writing process; a cleanup tool unlinks rather than writes new content.
level: high
Stage 4: commands run
A foothold is only useful if the attacker can run commands, and on Linux every command is a new process whose parent is the PHP worker. The first rule keys on the child binary or a reverse shell marker. The second keys on the setsid and mkfifo primitives, which decouple a command from the worker to hide the interactive child, regardless of the eventual shell.
title: PHP Worker Spawns Shell, Interpreter or Network Tool (PHP2Shell Post-Exploitation)
id: 052b034a-9c27-45ca-a4ce-b89f8a04a209
status: experimental
description: |
A PHP worker (php-fpm, php-cgi, the php CLI, LiteSpeed lsphp, FrankenPHP, or Apache running mod_php) started a shell,
a scripting interpreter, a download or socket tool, a recon binary, or a command line carrying a reverse shell marker.
Every command an attacker runs through PHP remote code execution or a dropped webshell starts this way, so this is
the stage where the PHP2Shell chains (CVE-2026-109618, CVE-2026-109619, CVE-2026-115560) become visible to an EDR.
The parent is matched on its executable basename, anchored, so distribution suffixes such as php-fpm8.3 match and
unrelated paths that merely contain "php" do not.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-leaked-php-core-rce-cve-2026-109618-109619
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-cve-2026-115560-session-upload-progress-unpatched-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.execution
- attack.t1059.004
- attack.initial-access
- attack.t1190
- cve.2026-109618
- cve.2026-109619
- cve.2026-115560
logsource:
product: linux
category: process_creation
detection:
selection_parent:
ParentImage|re: '/(php-fpm|php-cgi|php|lsphp)[0-9.]*$|/(httpd|apache2|frankenphp)$'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/zsh'
- '/ash'
- '/ksh'
- '/busybox'
- '/python'
- '/python3'
- '/perl'
- '/ruby'
- '/curl'
- '/wget'
- '/nc'
- '/ncat'
- '/socat'
- '/id'
- '/whoami'
- '/uname'
selection_marker:
CommandLine|contains:
- '/dev/tcp/'
- 'mkfifo'
- 'fsockopen'
- '-e /bin/sh'
- 'bash -i'
condition: selection_parent and (selection_child or selection_marker)
falsepositives:
- PHP applications that legitimately shell out (ImageMagick or ffmpeg wrappers, some CMS cron tasks, deploy hooks). Baseline per host and allowlist the known parent and command line pairs before enforcing.
- mail() runs sendmail, which is deliberately not in the child list.
level: high
title: PHP Worker Spawns a Detached or FIFO-Backed Command (Reverse Shell Delivery)
id: 281b7922-9be3-492b-a3f6-55fec22bc5c6
status: experimental
description: |
A PHP worker started a process that detaches from the worker's process group (setsid) or builds a named-pipe
pipeline (mkfifo). Both are ways to run a command whose lifetime and I/O are decoupled from the PHP worker, which
is how an in-process-execution payload avoids leaving an obvious interactive child under the worker. Complements
the shell-spawn rule, which keys on the child binary name; this one keys on the detach and pipe primitives
regardless of the eventual shell.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.execution
- attack.t1059.004
- attack.t1620
logsource:
product: linux
category: process_creation
detection:
selection_parent:
ParentImage|re: '/(php-fpm|php-cgi|php|lsphp)[0-9.]*$|/(httpd|apache2|frankenphp)$'
selection_detach:
Image|endswith:
- '/setsid'
- '/mkfifo'
selection_marker:
CommandLine|contains:
- 'setsid '
- 'mkfifo '
condition: selection_parent and (selection_detach or selection_marker)
falsepositives:
- A PHP application that legitimately backgrounds a worker task with setsid (rare; usually a queue runner invoked by cron or a dedicated user, not by the web-facing PHP worker). Allowlist the known command line.
level: high
Windows
The Windows PHP file-handling path is one of the exposed surfaces, so the Linux signals need Windows equivalents: a PHP CGI or CLI process starting a command interpreter, and a PHP process creating a session file.
title: Windows PHP Worker Spawns Command Shell or Writes a Session File
id: fc043c31-dc45-4c2c-8c60-f453cd54c481
status: experimental
description: |
The Windows equivalents of the Linux PHP2Shell post-exploitation signals, since the Windows PHP file-handling path
is one of the exposed surfaces. Two independent behaviours: a PHP CGI or CLI process starting a command interpreter
(the Windows analogue of the worker-spawns-shell rule), and a PHP process creating an oversized session file (the
session-as-vehicle rule). Process creation uses Security 4688 or Sysmon 1; file create uses Sysmon 11.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.execution
- attack.t1059.001
- attack.t1505.003
logsource:
product: windows
category: process_creation
detection:
selection_parent:
ParentImage|endswith:
- '\php-cgi.exe'
- '\php.exe'
selection_child:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
condition: selection_parent and selection_child
falsepositives:
- A PHP application on Windows that legitimately shells out through a scheduled task or a known admin tool. Baseline per host and allowlist the parent and child pair.
level: high
title: Windows Oversized PHP Session File Created (Sysmon 11)
id: 8f40c6e8-3227-4048-b4c5-de3fba5f62c6
status: experimental
description: |
A PHP session file created on Windows that is abnormally large. Normal PHP session files are well under 1 KB; an
oversized one is the session-decode execution vehicle (see the Linux session-file rule). Sysmon event 11 does not
carry file size directly in all configurations; where it does not, pair this file-create signal with a size check
from a file-integrity source, or alert on sess_ file creation outside the configured save_path.
references:
- https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026
author: RedEye Security (Caver / Carbide detection engineering)
date: 2026-10-24
tags:
- attack.persistence
- attack.t1505.003
- cve.2026-115560
logsource:
product: windows
category: file_event
detection:
selection:
Image|endswith:
- '\php-cgi.exe'
- '\php.exe'
- '\httpd.exe'
TargetFilename|contains: '\sess_'
condition: selection
falsepositives:
- A legitimate large session written by the application. Baseline the application's session size and correlate with a size source where available.
level: medium
At the network layer
By the time a crash or a shell fires, the request has already succeeded, so it is worth watching the request shape too. These are Suricata rules, and the same logic fits a WAF. They alert on a session-upload-progress value carrying a pipe, a multipart filename far longer than any real one, an abnormally high count of multipart parts, a session-upload-progress field combined with a serialize-handler marker, and an abnormally long session id in Set-Cookie (the leak oracle). The thresholds are starting points: measure your own traffic, alert, review, then consider drop.
# PHP2Shell HTTP-layer detection (Suricata). RedEye Security, 2026-10-24. # These watch the request shape, so they alert before the crash or shell fires. # SIDs are in a local range; renumber for your ruleset. Thresholds are starting # points: measure your own traffic and tune. Alert, review, then consider drop. # # Reference: https://threat-intelligence.redeyesecurity.com/blog/php2shell-part-two-surviving-php-flaws-2026 # 1. A session-upload-progress field whose value carries a pipe. Legitimate # progress values do not; the pipe is the key-injection separator. alert http any any -> $HTTP_SERVERS any (msg:"RedEye PHP2Shell: session_upload_progress field value contains pipe"; flow:to_server,established; http.request_body; content:"PHP_SESSION_UPLOAD_PROGRESS"; content:"|"; distance:0; within:256; classtype:web-application-attack; sid:9200001; rev:1;) # 2. A multipart filename field far longer than any real filename. alert http any any -> $HTTP_SERVERS any (msg:"RedEye PHP2Shell: oversized multipart filename field (>1KB)"; flow:to_server,established; http.request_body; content:"Content-Disposition"; content:"filename=\""; distance:0; isdataat:1024,relative; classtype:web-application-attack; sid:9200002; rev:1;) # 3. An unusually high Content-Disposition count in one request (amplification # shape). Count enforced with a flowint; tune the ceiling to your apps. alert http any any -> $HTTP_SERVERS any (msg:"RedEye PHP2Shell: excessive Content-Disposition parts in one request"; flow:to_server,established; http.request_body; content:"Content-Disposition"; flowint:re_cd_count,+,1; threshold:type threshold, track by_src, count 11, seconds 1; classtype:web-application-attack; sid:9200003; rev:1;) # 4. Session-upload-progress present together with a serialize-handler marker in # one body (the handler-confusion combination, CVE-2026-115560 class). alert http any any -> $HTTP_SERVERS any (msg:"RedEye PHP2Shell: session_upload_progress with serialize-handler marker in one body"; flow:to_server,established; http.request_body; content:"PHP_SESSION_UPLOAD_PROGRESS"; content:"|O:"; classtype:web-application-attack; sid:9200004; rev:1;) # 5. An abnormally long PHPSESSID in a Set-Cookie response (heap-leak oracle). # Normal session ids are 26-32 chars; a long one is leaked bytes returning. alert http $HTTP_SERVERS any -> any any (msg:"RedEye PHP2Shell: oversized PHPSESSID in Set-Cookie (heap leak oracle)"; flow:to_client,established; http.header; content:"Set-Cookie|3a 20|PHPSESSID="; nocase; isdataat:64,relative; classtype:web-application-attack; sid:9200005; rev:1;)
Hardening that makes the signals reachable
Two of the strongest stages are blind on a default install, so a short configuration pass is part of the detection, not separate from it.
- Forward worker stderr. By default php-fpm sends a worker's stderr nowhere, so
zend_mm_heap corruptedand glibc aborts never leave the host. Setcatch_workers_output = yesanddecorate_workers_output = yesin each pool, anderror_log = syslogfor the master. Forwarded lines then readWARNING: [pool www] child <pid> said into stderr: "<message>", which is the form the stage 2 rule matches. - Make corruption abort instead of being exploitable. On hosts that can spare the speed, run PHP on the system allocator with a hardened allocator underneath:
USE_ZEND_ALLOC=0in php-fpm's service environment, with Scudo or hardened_malloc preloaded. Many heap corruption bugs that would otherwise be quietly exploitable become an immediate, logged abort. Measure the cost first; it depends on the workload. - Keep the kernel crash lines on. The kernel writes
segfault atlines only whiledebug.exception-traceis 1, which is the default. Check it withsysctl debug.exception-trace. - Narrow what a compromised worker can do. A systemd
SystemCallFilter=on the php-fpm unit, built from what the worker actually uses, makes the kernel refuse the calls an exploit needs next (making memory executable,memfd_create,ptrace), even after the memory is corrupted. Build the list from observation on staging; a filter that is too tight takes the site down. - Disable in-dashboard plugin and theme installs on CMS hosts. It removes the main false positive for the webshell-write rule and an attacker convenience at the same time.
How these were tested
Each rule carries a fire and a no-fire matrix, run through the real search engine against the shipped rule, and each was mutation tested: we deliberately broke the rule in known ways and confirmed a named fixture turned the suite red, so no test is decorative. The no-fire cases are the ones that matter for noise. The spawn rule stays quiet for php-fpm calling sendmail (which mail() does), for an unrelated tool under an anchored-away path, and for sshd starting bash. The webshell rule stays quiet for an image upload, for a deploy tool that is not the PHP worker writing index.php, and for a session file written outside any web root. The crash rule stays quiet below the threshold, for a non-PHP process name, and for a graceful SIGTERM reload. Each signal can be reproduced on a disposable lab host without any exploit code: drop <?php system('id'); into the web root and request it for stage 4, kill -SEGV a worker three times for stage 1, and a double free through FFI on a lab build for the stage 2 abort.
Coordinated disclosure: who we told, and when
Before any of this was public, RedEye reported the researcher acd421's findings in good faith to every party that can fix them, ahead of disclosure, and said plainly that we would not publish exploit detail ahead of a fix and would not send exploit material by email. We are not claiming the discovery; the research is acd421's. We asked each recipient to credit acd421 as the researcher and to note RedEye Security as the party that reported in good faith. The first round went out on October 24, 2026, inside a fifteen-minute window, to each vendor's own published security channel. The emails themselves are at the end of this post.
| When (Oct 24, 2026) | Reported to | What we reported |
|---|---|---|
| 12:20 AM | Ubuntu Security ([email protected]) | PHP 8.1.2 on Ubuntu 22.04 LTS: a session save_path INI-handling flaw reachable through stale session status, on the package that never received the October fixes, so those hosts stay exposed to the original class. |
| 12:22 AM | PHP Security ([email protected]) | Session-handling and object (un)serialization behaviour that persists after the 2026-10-21 releases (8.2.35, 8.3.36, 8.4.27, 8.5.12). |
| 12:23 AM | NativePHP maintainers (via Tidelift Security) | A framework-level NativePHP mobile path: an ungated bridge API combined with a raw file copy and unserialize of task data, which runs object-injection gadget chains with no memory-corruption bug and independent of PHP-level mitigations. |
| 12:34 AM | CISA ([email protected]), cc CERT/CC | A coordination update following our October 23 message on CVE-2026-115560, flagging that public disclosure by the researcher was imminent and outside our control, widening the scope to the related cluster (PHP core, Windows PHP, NativePHP, Ubuntu 22.04 LTS), and offering technical detail through a secure coordinated channel such as a CERT/CC VINCE case. |
RedEye is a CVE Numbering Authority, but our CNA scope is our own product, so we did not assign CVE IDs for any of these; assignment belongs to each vendor. We offered reproduction detail, environment specifics and a call to every recipient, and said we would proceed with defensive publication, detection guidance and no exploit detail once the researcher's disclosure was public. This page is that defensive publication.
Credit and timeline
The research and the working chains are the researcher acd421's, and nothing in this pack is derived from their exploit material. The researcher credits RedEye as the first defensive report on the surviving PHP2Shell flaws, and RedEye reported the new flaws to PHP, Canonical and the NativePHP maintainers ahead of public disclosure. Every rule here was written, tested and merged in Caver and Carbide first.
Stated plainly, "first" means the first defensive report on the surviving flaws, as credited by the researcher, with RedEye detections shipping ahead of a complete vendor fix. It does not claim that no other vendor had any PHP webshell or web-server-spawns-shell rule before this date; generic forms of those are long-standing practice. What is specific here is the PHP2Shell framing, the crash and corruption-report stages, the anchored parent matching for versioned PHP binaries, the session-file and lock-drop coverage, and the network layer.
Credit also to Patrick Duggan of DugganUSA Threat Intelligence, who was publishing on this early and whose feeds let us corroborate that exploitation attempts were real and dated rather than assumed. The indicator set he carries for the Potassium campaign riding PHP2Shell is aggregated and redistributed third-party research, sourced to Sophos, Wordfence, Hunt.io and SOCRadar, and he is careful to say so rather than present it as his own detections. The October 5 honeypot hit above is his own first-party observation. He also corrected two of his own earlier calls to us in writing within a day of making them, which is the behaviour you want from anyone you take intelligence from.
Reuse the rules with credit to RedEye Security (Caver / Carbide) in rule metadata and release notes. CISA's own Sigma rule is in its PHP advisory; this pack is the wider behavioural set behind it.
Where RedEye stands
The researcher behind the disclosure credits RedEye as the first defensive report on these surviving flaws. We reported these to PHP, Canonical, and the NativePHP maintainers in good faith ahead of public disclosure, so the people who can fix them had notice first. We are not assigning CVE IDs for these; our CNA scope is our own product, and assignment belongs to each vendor. We did not do the discovery, and we are crediting the research to acd421. We will update this page as fixes ship and as advisories publish.
Receipts: the disclosure emails
The good-faith reports above, as sent. Exploit detail was deliberately kept out of every one of them: they establish the timeline and the coordinated routing, not how the bugs work. Click any image to open it full size.

save_path path on the package that missed the October fixes.


Questions about your exposure?
RedEye Security provides assessments for organizations that need to understand their real risk.
Talk to us