Tag: PHP2Shell

Patching Closes the Door. It Doesn’t Tell You Who Walked Through It.

Binlayze blog: Patching closes the door

PHP2Shell just handed every MSSP two problems at once.

CVE-2026-109618 and CVE-2026-109619 are unauthenticated RCE flaws in PHP itself, not a plugin, so they sit underneath a huge share of the web apps your customers run. Patches landed October 21, but attackers didn’t wait. Amazon’s MadPot honeypot logged an exploitation attempt on October 17, public PoCs are circulating, and PHP 7.3 and older, including PHP 5, have no fix at all.

The squeeze

  • Existing customers want answers today: Are we exposed? Were we hit before we patched?
  • New inbound IR requests are arriving from organizations that aren’t your customers yet, and they won’t wait in your queue.
  • The same analysts are handling both.

Patching closes the door. It doesn’t tell you who already walked through it. Every “we’ve patched” conversation turns into a “were we compromised?” conversation, and that question doesn’t scale with manual collection and one-box-at-a-time triage.

Why “we’ve patched” isn’t the end of the conversation

Patching closes the door. It doesn’t tell you who already walked through it.

With exploitation starting before disclosure, every “we’ve patched” conversation becomes a “were we compromised?” conversation. Answering that means looking at every exposed web server for webshells, unexpected child processes, new persistence and outbound connections that shouldn’t exist.

That question doesn’t scale with manual collection and one-box-at-a-time triage. If each investigation means an analyst logging into a server, pulling artifacts by hand and reviewing them in isolation, your capacity caps out long before the requests do.

Answering “were we hit?” at scale

Remote evidence collection changes the maths. Instead of one analyst working one server at a time, the same analyst can sweep hundreds of servers at once and review the results in one place. With Binalyze AIR, MSSP teams can:

  • Collect forensic evidence remotely from Windows, Linux and macOS web servers, without waiting for site access.
  • Sweep hundreds of endpoints for indicators at once using YARA, Sigma and osquery rules, with evidence and findings kept together for review.

AIR automates the collection and the repetitive groundwork. Your analysts keep the judgement. That’s what lets the same team cover your existing book of business and the new IR engagement that shows up on Friday night.

Turn the spike into a service

Every major vulnerability brings a wave of “were we hit?” questions. MSSPs that can answer them quickly and consistently win the follow-on work: retainers, assessments and longer-term IR relationships. PHP2Shell won’t be the last one.

In the next post, we break down a three-step PHP2Shell compromise assessment you can run with AIR today.

If PHP2Shell is about to double your caseload, let’s talk.


Investigating PHP2Shell after patching

Binalyze blog_PHP2Shell post-patch investigation

If your organization is patching PHP2Shell today, investigate the systems that were exposed as well. A successful update closes the vulnerability. Any webshells, stolen credentials or other access established before that update still need to be found and addressed.

How PHP2Shell enables remote execution

PHP2Shell refers to two critical vulnerabilities in the PHP runtime, disclosed on 21 October 2026. Both are rated CVSS 9.2 and can allow an attacker without credentials to execute code with the web worker’s permissions. [1, 2]

CVE-2026-109618 involves memory exhaustion interrupting an operation while PHP’s internal state is incomplete. Request cleanup can then process that invalid state. CVE-2026-109619 involves a worker retaining references to freed memory from an earlier request and using them during a later one. Carefully crafted requests can turn these memory safety failures into code execution. [1, 2]

Apache mod_php is particularly exposed: a demonstrated attack executes before application code runs, so the application’s login checks cannot protect that path. Other deployments, including PHP-FPM, also need attention, although exploitability depends on the specific vulnerability and application conditions. [1, 2]

The first fixed releases are PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Apply the appropriate release or vendor-backported package, and restart or replace affected workers. Configuration workarounds do not provide a complete fix. [3]

A lesson from a previous Exchange investigation

Several years ago, I investigated an organization after an attacker attempted to encrypt systems across its estate using BitLocker. Fortunately, the encryption attempt failed. The ransom note was left behind.

In that previous case, we found two webshells on an on-premises Exchange server. The organization had patched that server within a day or two of the vulnerability becoming public and the Microsoft update becoming available. Several months later, after migrating to Office 365, it believed the server had been decommissioned.

The server was still online. The patch had worked, but the attacker had planted a webshell during the brief window before it was applied. Nearly a year later, the attacker returned through that surviving access.

This was a different vulnerability and technology, but the lesson applies directly to PHP2Shell. Patching can prevent exploitation of the original flaw while leaving an attacker’s existing foothold intact. Migrating a service also needs a verified shutdown of the systems it replaces.

Hunt for what the attacker could have left behind

A webshell is server-side code that an attacker can reach over HTTP to issue commands or perform other actions. Once it is present, requests to it may use legitimate application functionality without triggering the original vulnerability again.

Search potentially affected hosts for unexpected scripts in web roots, upload directories and other application-writable locations. Compare files with trusted application releases and deployment records. Include unusual extensions and older files: attackers can disguise names and alter timestamps.

Correlate suspicious files with requests to their URLs, PHP errors, process execution and outbound connections. Large form submissions, memory-exhaustion errors and unexpected shells spawned by web workers are useful investigation leads. Successful execution may return HTTP 200 without crashing the worker. [4]

Preserve evidence before removing suspected shells. Then investigate associated accounts, scheduled execution, services and exposed secrets. A search that finds no webshells cannot exclude other persistence or credential theft.

Illustrative PHP timeline: a webshell planted before patching may remain usable after the update.

Two starting rules for your investigation

The companion download includes a Sigma rule for Linux web workers directly spawning shells, plus a YARA rule for PHP files containing both request-input references and code or command execution functions. Use Sigma against retained process telemetry or new events, and YARA against collected files.

These are hunting rules for possible compromise, not vulnerability scanners or definitive PHP2Shell signatures. Legitimate applications can match. Obfuscated shells, indirect execution and activity outside their coverage can be missed. Validate field mappings, tune against your environment and investigate matches in context.

Make investigation part of the response

For Binalyze AIR users, the practical next step is an evidence-led investigation of exposed hosts: collect relevant files and logs, examine suspected persistence and establish what happened during the exposure window. Include systems believed to be retired and verify that they are actually offline.

Patch promptly, and give the search for surviving attacker access the same urgency. A completed patch ticket is evidence of remediation of the flaw. Determining whether an attacker already used it requires investigation.

Need hands-on help investigating PHP2Shell exposure? Our Support & Services team can help. → Talk to a Binalyzer


Sources and companion rules

[1] CVE-2026-109618 and PHP security advisory

[2] CVE-2026-109619 and PHP security advisory

[3] CERT-EU advisory and patch guidance

[4] Datadog Security Labs technical analysis and detection observations

Companion files: php_web_worker_shell.yml, php_webshell_candidates.yar and RULES_README.txt. These draft rules require local validation before operational use.