Skip to content

The PHP Incident Playbook with Markmonitor

PHP2Shell showed that patching isn’t the finish line. Use this 7-step playbook to find exposed PHP hosts, restart workers, and verify the fix sticks.

Billy McDiarmid·VP Customer Engineering
Published: November 17, 2026·10 min read

When a vulnerability lies in the PHP runtime rather than in the application, the incident looks completely different. You’re not patching one plugin. You’re reasoning about thousands of request handlers, worker processes, and hidden dependencies that all inherit the same risk. That’s what happened on 20 October with the two PHP flaws known as PHP2Shell, which let anonymous attackers run code on affected servers under the right conditions.

This post pulls together the practical lessons from our recent session with Markmonitor CISO Michael Rogers, so you can build the playbook from an incident response and operations perspective before the next emergency. If you remember one thing, remember that inventory and worker restarts aren’t optional. They’re the difference between “we patched” and “we’re still exposed.”

Why PHP runtime flaws hit differently than app vulnerabilities

Most web vulnerabilities live in the application layer. A plugin, a module, a chunk of custom code. You patch the component and move on.

Runtime flaws don’t work that way. These bugs sit in the engine that serves web requests, so they reach well past “your PHP sites.” It doesn’t matter if the site was built a decade ago or runs inside a network appliance. If PHP executes the request, the runtime is part of your threat model.

Think of external-facing servers as your organization’s front door. When an attacker can reach that door without authentication and walk away with code execution, “wait and see” isn’t a real option.

Three things make this class of vulnerability urgent.

  • Attackers can reach it from the internet, often without authentication.
  • It allows for durable compromise, such as web shells.
  • Fixing it takes more than a patch. You also need worker restarts and decisions about shutting services down.

Two PHP flaws, one problem with request state

The incident centered on two CVEs, both rated 9.2 under CVSS v4. Both abuse the way PHP manages request state within a process.

Flaw 1 (CVE-2026-109618) corrupts cleanup after an out-of-memory error

An attacker can trigger an out-of-memory bailout while PHP is initializing a request. The bailout can leave internal request state only partially initialized, which request shutdown may then process as if it were valid. Under certain server configurations and conditions, this can lead to remote code execution.

Billy McDiarmid, VP Customer Engineering at Red Sift, suggests an analogy to picture a hotel where housekeeping only cleans half the room. The next guest finds things that shouldn’t be there, except here the attacker arranged exactly what gets left behind and when.

Flaw 2 (CVE-2026-109619) lets request state outlive the request

State that should die with a request can survive and get reused by the same worker on a later request. That’s use-after-free territory, and it opens the door to memory exploitation across requests.

The operational takeaway is that web server worker processes are part of the vulnerability surface. Patch the binaries without restarting workers, and the old processes keep running unsafe code.

“Even though you patch, the attacker may have already got in. You’re not going to notice unless you’re looking for indicators of compromise after the fact.” - Michael Rogers, CISO, Markmonitor

Three assumptions that left teams exposed

Teams didn’t get caught out because they lacked security tools. They got caught out because reasonable assumptions stopped holding once runtime behavior met real operations. Billy and Michael cover these three assumptions:

“Only older versions are affected”

This one hit every PHP version from 5.4 onward. That’s a long tail that most patch cycles overlook, and most legacy branches no longer receive security maintenance.

“Our web defenses block known exploit patterns”

Input filtering and WAF pattern blocking help, but aren’t a fix. Attackers can reshape requests so the runtime misreads its own state transitions. A defense tuned to block typical bad inputs won’t reliably catch state-machine exploitation.

“We patched the binary, so we’re safe”

This was the most painful one operationally. Your patch can deploy correctly, and the environment can still be vulnerable in two common cases.

  • PHP-FPM pools keep old workers alive.
  • Apache child processes keep serving with memory state they loaded before the patch.

Urgency comes from discoverability and automation, not just severity

Why did this incident move so fast? Michael said flaws like this don’t live in some niche environment.

Urgency climbs when three things line up.

  • Attackers can reach the flaw from the internet.
  • They can quickly test or emulate the exploit.
  • A huge number of enterprises run the affected runtime.

The session highlighted early signals from research tooling and partnerships that accelerated proof-of-concept testing. Large-scale exploitation isn’t guaranteed, but attackers can operationalize fast, especially with freely available reconnaissance tools. Plan for that.

“Most organizations have some type of PHP running in their environment, and it’s most commonly external facing. If it’s external facing, everyone can knock on that door and see if they can get in,” Michael said.

PHP’s footprint makes this everyone’s problem, not one industry’s or one platform’s. About 70% of websites with a known server-side language run PHP. Governments and large enterprises had to act, often conservatively, based on what the advisories implied about risk. With exposure that wide, the sensible plan is to assume exploitation attempts follow disclosure.

A 7-step remediation playbook for PHP runtime incidents

Here’s a practical, defensible sequence that turns “we heard there’s a PHP issue” into concrete actions.

  1. Find every internet-facing host running PHP. Don’t stop at your main domains. Include proxies, load balancers, and internal gateways that expose HTTP endpoints.
  2. Confirm the exact PHP version and distribution. Container tags and package names don’t tell the full story. Check what’s actually serving traffic from the outside.
  3. Patch the runtime. Apply vendor fixes for your installed PHP builds and related components.
  4. Restart every worker and service that loaded the old code. That includes PHP-FPM pools and any long-lived application workers. If a process is still alive, assume it’s still vulnerable.
  5. Use bridge mitigations as temporary controls, not fixes. Compensating controls can reduce the risk posed by known variants. They won’t block every exploitation path.
  6. Check for compromise after every change. Look for web shells, unexpected persistence, and unusual request patterns. Assume attackers may have gotten in before you patched.
  7. Measure exposure continuously instead of relying on a one-time scan. Exposure shifts after patching because of lifecycle drift, shadow infrastructure, and gaps in version reporting.

This sequence follows the playbook guidance from the session and lines up with what we see in practice. In runtime incidents, verification and restarts are part of remediation, not extras.

When should you take services offline?

Pulling an external service offline is disruptive and costly. So is cleaning up after attackers get remote code execution on your servers. When you’re confident RCE is in play, you may need to move faster than patches can propagate.

The session boiled the decision down to four questions:

  • Is it internet-facing?
  • Can an attacker exploit it without authentication?
  • Is there evidence of active exploitation?
  • Can you patch and restart workers fast enough to get ahead of exploitation?

If exploitation is plausible and you can’t guarantee fast isolation, taking affected endpoints offline is a defensible call, especially when authoritative advisories recommend it.

The inventory problem

If one thing slows remediation down every time, it’s inventory.

Here’s a number from the session that should bother you: 38% of PHP hosts didn’t disclose their version during the initial audit. Teams could confirm PHP was there but not which version was running, which slowed every subsequent prioritization decision.

Then there’s the question of where PHP actually lives.

  • In products you didn’t deploy yourself.
  • Behind vendor-managed portals.
  • Inside acquisitions and legacy systems.
  • In shadow IT that never made it into the official asset inventory.

Post-incident measurements showed fast early progress, but a long tail stayed exposed after the patching push. The uncomfortable truth is that patching can be fast while lifecycle management stays incomplete.

What public measurement showed after patch day

The session walked through scan-based exposure tracking over time. Here’s what it showed.

  • Exposure dropped fast once advisory-driven actions kicked in.
  • Progress plateaued after the first remediation waves.
  • Many hosts disappeared from scan visibility, suggesting shutdowns, configuration changes, or teams pulling legacy and suspect systems.
  • A large number of hosts remained vulnerable over time due to incomplete restart coverage, hidden dependencies, and long-tail version gaps.

“Patching was generally quick. But it highlighted issues with lifecycle management, with hosts organizations didn’t know existed, and with shadow IT,” says Billy. The exact percentage matters less than the pattern. One-time scanning isn’t enough. Exposure keeps moving, so you have to keep checking after every change.

Questions to ask your vendors and third parties

Plenty of the systems that matter most aren’t owned by your security team. Vendor-managed platforms, domain-adjacent infrastructure, appliances, and third-party services can all run vulnerable runtimes.

“Your registered domain portfolio is the starting point. But software doesn’t live on the domains. It lives on the hostnames underneath them, and the gap between the domains we own and the hostnames that are live is significant.” - Billy McDiarmid, VP Customer Engineering, Red Sift

Here’s what we recommend.

  • Ask vendors which PHP runtimes and versions they run.
  • Get evidence of their patching and restart process.
  • Confirm their monitoring coverage and the accuracy of their version reporting.
  • Treat domain and external attack surface management as an end-to-end ownership problem, not a marketing task.

Domain ownership and host exposure aren’t the same thing. Your registered domains can be locked down while the servers behind them still run PHP processes with risky state behavior.

Ownership, resourcing, and practice

An incident like this tests organizational maturity in three ways.

  • Can you build an inventory under pressure?
  • Can you make fast operational changes, like patching, restarting, and applying shutdown criteria?
  • Can you coordinate decisions across teams?

Some organizations moved late. The session pointed to resourcing constraints, slow advisory triage, and uncertainty about whether systems were affected as likely reasons. Patches were available quickly, and hesitation still cost time.

The fix is practice.

  • Run tabletop exercises with real-world assumptions, including external reach, worker restart requirements, and business impact tradeoffs.
  • Rehearse who decides between taking a service offline and patching only.
  • Test your evidence-gathering paths so your first real incident isn’t your first rehearsal.

Seven takeaways for the next incident

  • Inventory everything. Cover servers, workers, domains, and everywhere PHP runs.
  • Know your critical path. Identify the endpoints, business services, and request handlers that matter most.
  • Assign ownership. Decide who’s responsible for patching, restarts, and verification.
  • Plan for the long tail. You’ll have legacy versions and hidden deployments.
  • Hold third parties to evidence. Ask for patch, restart, and monitoring details.
  • Measure exposure continuously. A one-time scan won’t cut it.
  • Set offline criteria in advance. That way the business isn’t improvising under stress.

Runtime vulnerabilities are a reminder that security isn’t only about finding flaws. It’s about controlling the environments where code runs. If your organization treats patching as a single event rather than a lifecycle (patch, restart, verify, monitor), the next incident becomes harder to contain.

Start with your own inventory. Could you list every internet-facing PHP host you own by tomorrow afternoon? If the answer is no, that’s the first place to start. Red Sift’s attack surface management identifies the hostnames and versions behind your domains, giving you the information to act ahead of the next runtime flaw.

Want to catch this session on-demand? Watch the replay.

Billy McDiarmid
Billy McDiarmid
VP Customer Engineering

Billy is a solutions engineering leader, technologist, cybersecurity advocate, and researcher. As VP of Customer Engineering at Red Sift, he leads a global team helping security professionals create a safer internet.