Skip to main content

Agentic SOC Alliance Expands as Enterprises Prioritize Autonomous Security

Search
  • Solutionschevron right
  • Industrieschevron right
  • Platformchevron right
  • Resourceschevron right
  • Customerschevron right
  • Partnerschevron right

PHP2Shell: How to Stay Ahead of a Zero-Day, from Asset Discovery to Threat Hunting

Share blog icon

Back to top

Back to top

October 23, 2026

PHP2Shell: How to Stay Ahead of a Zero-Day, from Asset Discovery to Threat Hunting

Critical vulnerabilities in PHP, the scripting language behind roughly 70% of the world’s websites, triggered emergency shutdowns of banking, airline, rail, tax and government services this week while they tested their systems and implemented appropriate patches.

The disruption stretched from Tokyo to Helsinki. “I’ve not seen anything like this in a long, long time,” said Microsoft CEO Satya Nadella.

Teams at OpenAI, Google-owned Wiz and a company called Calif uncovered the flaws, collectively referred to as PHP2Shell. Every PHP release from the past decade, back to version 5.4. carries at least one flaw. The two vulnerabilities are tracked as CVE-2026-109618 and CVE-2026-109619.

What is PHP2Shell?

PHP2Shell is a pair of unauthenticated remote code execution flaws in the PHP core:

  • CVE-2026-109618 (out of memory during request setup). An out-of-memory condition while PHP sets up a request leaves the request data partly built. The unfinished request can lead to code execution, or to server memory leaking back in the response.
  • CVE-2026-109619 (stale state reused after free). PHP may retain references to request data after its underlying memory has been freed. Subsequent requests handled by the same worker can access these stale references. PHP's session upload progress feature is one confirmed path.

The defects sit in the scripting language itself, not in any application built on it. As a result, every web-facing PHP deployment running an affected version faces immediate risk, including PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed. Updating WordPress, Drupal or a framework does not fix the flaws; the PHP runtime itself has to be updated.

Threat actors can exploit the flaws remotely and seize control of a web server without presenting a single credential. A compromised server opens several paths for intruders, who can steal sensitive data, deface websites, disrupt services, or move deeper into the network.

The PHP project has released fixes in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 and administrators must apply the updates to resolve the flaws.

Exploitation attempts began before the patch

Details of the flaw appeared to go public ahead of the patch. Exploitation began before a fix existed. On October 17th, Amazon’s Chief Information Security Officer, CJ Moses, reported that the company’s security team caught a PHP2Shell attempt in a monitoring system that was designed to bait hackers. A patch arrived on October 21st, four days after Amazon’s first detection.

Cloudflare CEO Matthew Prince described the surge across his company’s network. “In the 10 hours before it was publicly announced across the network, we saw thousands of attempts to exploit it.”

“That jumped to tens of thousands in the 45 minutes post announcement…” Prince said.

Sites went dark worldwide

Government and company websites around the world went dark as organizations moved to reduce exposure.

  • Asia-Pacific: Japanese services including pixiv, Niconico, shop builder BASE, e-book store BOOK☆WALKER and several mobile games went into emergency maintenance on October 21 so operators could apply PHP’s emergency patches. pixiv’s maintenance ran into the early morning of October 22.
  • United States: HR software provider BambooHR took its service offline across the United States, Canada and Ireland on October 21, warning that payroll would be interrupted. For its customers, a flaw in a programming language became a payroll disruption.
  • Europe: Sites for Edinburgh and Oxford councils and London’s Metropolitan Police were reported unavailable, while the Netherlands pulled DigiD, its national login service, and its cyber agency’s own site. Finland, France, Denmark and Germany also took government services offline.
  • Latin America: Brazil’s telecom regulator Anatel suspended its SEI electronic case-management system from 12:15 to 22:05 on October 21 as a precaution, and federal SEI systems were also pulled offline. Anatel told CNN Brasil there was no sign of intrusion.

“While vendors work to patch their individual software packages, it is important for organizations to assess whether additional mitigation steps should be taken…” CISA wrote.

Why patching can’t keep up

Jamie Moles, senior technical manager at ExtraHop, points to legacy software as the culprit behind the crisis. Roughly 45% of PHP websites run an outdated version of the codebase, leaving legacy sites exposed to flaws present in every release back to 5.4.

Moles is skeptical of the shutdowns. “Taking affected sites offline may offer a quick fix, but it is a stopgap for a problem of such breadth”, said Jamie. The larger challenge is tempo. “AI is accelerating vulnerability discovery every day, and attackers will race ahead of patching and upgrade cycles for legacy software. Defenders need to move at the speed of AI-powered adversaries”.

Sarah Cleveland, ExtraHop’s Senior Director of Federal Strategy, has reached the same conclusion from a government vantage point. A former U.S. Air Force Colonel, Cleveland oversaw network security and 1,500 personnel. “Patch Tuesday is obsolete,” she said in an interview.

And PHP affects more than just websites, there are components in firewall management interfaces, security platforms, and more. It's not a "one patch fixes all" in this case. PHP2Shell highlights a software supply-chain and patch-dependency problem, as products can "inherit" vulnerabilities from underlying software components. These rely on vendor-issued fixes or firmware updates, even in highly specialized devices.

Can your organization spot an intruder who got in before the patch? 

A patch resolves a vulnerability. However, the network shows whether or not a threat actor exploited the vulnerability ahead of a patch. In ExtraHop's 2026 Global Threat Landscape Report, 49% of organizations said they did not detect an intrusion until after data had been stolen; up from 31% the year before.

Attacker movement after a compromise requires network communication across internal systems. Reconnaissance, privilege escalation, database queries and staging data for exfiltration all generate network traffic. Application logs and web application firewalls often miss this exploitation, because the flaws can trigger before any application code runs.

The network does see the exploit requests. By observing real-time network activity, defenders can see exploits as they happen, including zero-days like PHP2Shell.

What to do this week

Five questions turn a headline into a board-ready answer:

  1. Do we know every PHP web server we run? Including servers behind load balancers, in the cloud and in business units that may never have been mentioned to the IT department. An inventory nobody has checked against live traffic is just an estimate.
  2. Can we see the traffic going to our PHP servers, including encrypted traffic? Encrypted traffic that stays opaque to detection tools hides the exploit.
  3. Were we hit before October 21st? How long will it take to answer "are we affected?", and will the answer hold up with auditors, regulators and the board?
  4. If an attacker planted a web shell, would we see where they went next? The web server is rarely the target. The databases and the identity systems behind it are.
  5. Is our detection independent of the systems the attacker controls? An attacker on a server can switch off the server’s agent and wipe the server’s logs. Out-of-band network evidence stays beyond the compromised server’s reach.

How ExtraHop detects PHP2Shell at every stage of an attack

ExtraHop supports defenders with four layers of visibility:

  1. Rapid asset discovery
  2. Detecting exploitation attempts in real-time
  3. Identification of post-exploitation activity and lateral movement
  4. Forensic and historical threat hunting

All detection described below comes from network traffic observed by agentless, out-of-band RevealX sensors, which run at up to 400 Gbps.

1. Find every PHP server

  • Uncover hidden PHP footprints: In large environments, tracking every legacy PHP application or third party web tool is notoriously difficult. RevealX continuously parses network traffic in real time to identify every active web server, and the software behind it, across hybrid cloud and on-premises data centers. A new server is visible the moment it starts communicating, not on the next scan cycle.
  • Follow coverage automatically. Follow coverage automatically: Because discovery is continuous, new web servers join the inventory as soon as they start communicating, with no list to maintain. Detection coverage extends to every new web server as soon as it appears, with no list to maintain.
  • Prioritize patching: Use the inventory to focus patching on exposed web servers, starting with public-facing portals.

2. Detecting exploitation attempts in real time

PHP2Shell exploits can fire before any application code runs, so application logs and many web application firewalls never record them. The network does. Every exploit attempt has to cross the wire. An NDR platform that inspects that traffic, decrypting it where needed, sees the malformed requests, abnormal connections and suspicious server responses that other tools miss.

When threats like this emerge, ExtraHop researchers build and release detections to help customers respond. For PHP2Shell, ExtraHop has made exploit detections available that RevealX customers with cloud-connected sensors receive automatically, with no action required. RevealX NDR also lets security teams write their own triggers and detections, and many customers deployed custom detections against PHP2Shell as the threat unfolded. The published exploit chains leave clear signals on the network that can reveal potential exploit activity:

Loading table...

Two lessons help teams tune for this:

  • Linked signals beat loud ones. A crashed request followed by later-stage activity from the same client within minutes deserves immediate investigation. A session-file request that gets a 200 response is a strong sign that code actually ran.
  • Don’t trust status codes alone. Depending on PHP’s error settings, the same crash can return a 500 or a 200, so detections that watch only for spikes in server errors will miss attacks.

3. See what comes after the shell

Once an attacker triggers the vulnerability to drop a web shell, the threat moves from web traffic to internal network behavior. NDR excels at catching post-compromise behaviors: 

  • Suspicious outbound connections: If a compromised PHP worker process establishes an outbound connection to an unauthorized C2 server, ExtraHop detects this unexpected session.
  • Interactive web shells: ExtraHop monitors internal traffic for anomalous base64-encoded commands in headers or non-standard file paths.
  • Lateral movement: In highly targeted environments like financial services, compromised web servers pivot to back-end databases or Active Directory. RevealX decrypts and inspects the identity protocols attackers rely on, including Kerberos, NTLM and LDAP. RevealX flags non-standard SSH or RDP connections and SMB credential dumping that originate from these web servers. More than 450 detectors, mapped to more than 150 MITRE ATT&CK techniques, cover the behavior that follows the exploit.

4. Look back before disclosure

Exploitation began before public disclosure. RevealX's continuous packet capture and record retention let teams rewind network history. Automated Retrospective Detection (ARD) re-checks stored traffic when new indicators emerge and every detection links to the transaction records and the packets behind it. ExtraHop has published suggested historical searches to help analysts hunt for exploit signatures from the days and weeks before the patch announcement. Useful starting points:

  • Client connections to web servers that sent more than 1 MB in small packets and received almost nothing back.
  • Bursts of multipart requests carrying PHP_SESSION_UPLOAD_PROGRESS from a single client.
  • Set-Cookie PHPSESSID values longer than 256 characters, or with characters PHP never issues.
  • Request URIs or query strings containing sess_ paths, or ../ traversal toward session directories.
  • New outbound connections, or new east-west connections to databases and domain controllers, from any web server that matched one of the patterns above.

Triage guidance for analysts

  • Read detections as attempts, not compromises. A detection shows that an attempt was seen, not that the server was vulnerable or breached. Check the victim's PHP version first.
  • Know which detections to escalate. A Session File Include with a 200 response, a Session Cookie Memory Leak, or a paired detection at risk 90 calls for immediate escalation. Isolate the server, preserve the packets, and hunt for lateral movement from that host.
  • Know the attribution. On every detection, the client is the offender and the server is the victim. Repeat activity between the same pair merges into one ongoing detection per hour, on any port.

Prerequisites, tuning and known limits

Prerequisites

  • The sensor must decrypt HTTPS. Traffic it can't decrypt isn't inspected.
  • Confirm that the "HTTP Servers" device group includes your PHP servers, including any behind a load balancer.
  • Set L7 Payload Bytes to Buffer to 16384. The default of 2048 is too small for multipart requests.
  • Add web vulnerability scanners and load testers to EXCLUDE_CLIENTS.

Tuning (one settings block in the trigger; make narrow changes first)

  • RAISE: one switch per variant. A switched-off match still logs when debugging is on.
  • PAIR_WITH: sets which follow-ups can complete a paired detection. It works independently of RAISE.
  • EXCLUDE_CLIENTS: lists addresses or IPv4 blocks that never raise or pair a detection.
  • UNPAIRED_RISK: ships at 0. Set it above 0 to also raise unpaired, full-size unparsed connections. CDNs, printers and one-sided captures cause most of those.

Known limits

  • Only the first 16 KB of each request body is guaranteed to be inspected.
  • Behind a CDN or reverse proxy, the two halves of an attack can arrive from different addresses, so they won't pair.
  • Variants that change the published request shapes may not be detected. Some CVE-2026-109619 paths leave no network signature. Patching remains the remediation.

ExtraHop supply chain

ExtraHop engineering teams conducted a thorough review of RevealX dependencies to verify that the RevealX platform does not rely on vulnerable PHP implementations.

Learn more

To learn more about attackers use web shells and internal pivots after exploiting a zero-day, read ExtraHop’s NetScaler Exploitation, Hidden Web Shells, and Internal Pivots and learn how ExtraHop detects each stage of an attack. 

blog image
Blog author
Bob Hansmann

Sr. Product Marketing Manager

Bob Hansmann is a Senior Product Marketing Manager at ExtraHop with 30+ years of experience bridging the gap between complex threat research and practical defense strategies. Bob Hansmann has spent over three decades helping enterprise security teams demystify advanced zero-day attacks and specializes in delivering clear, actionable Network Detection and Response (NDR) workflows. View Bob Hansmann’s complete professional profile on LinkedIn.

Share
LinkedIn logoX logoFacebook logo
Key Takeaways
  • PHP2Shell, a pair of remote code execution flaws in PHP, shut down government and commercial services worldwide.
  • Exploitation began four days before the October 21st patch, giving threat actors a head start on defenders.
  • Network traffic can reveal whether an attacker moved through the network before servers were patched.
  • ExtraHop provides PHP2Shell exploit detections that RevealX customers with cloud-connected sensors receive automatically.
  • Continuous packet capture lets teams rewind network history and search for exploitation signs from the time before disclosure.

Explore related articles

Experience RevealX NDR for Yourself

Schedule a demo