Home » Security Bloggers Network » Podcast: PHP2Shell—The PHP Flaws that Can Run a Stranger’s Commands Before Your App Even Loads
Podcast: PHP2Shell—The PHP Flaws that Can Run a Stranger’s Commands Before Your App Even Loads
Oct 28, 2026
Podcast: PHP2Shell—The PHP Flaws that Can Run a Stranger’s Commands Before Your App Even Loads
**Tova Dvorin (00:03)** Welcome to The Cyber Resilience Brief, a SafeBreach podcast. I’m Tova Dvorin, your host, joined as always by my favorite offensive cybersecurity engineer, Adrian Culley. This week, the PHP project released emergency fixes for two critical vulnerabilities, sending the internet into a tailspin. CERT-EU was already warning that some organizations might need to take websites offline, and now the NSA has given the whole thing a name: PHP2Shell. Adrian, we’re a few days past the patch. How concerned should people be? **Adrian Culley (00:32)** It is serious, Tova. However, cyber Black October or the vulnerability apocalypse, it is not. PHP sits underneath a huge share of the web: WordPress, Drupal, Joomla, Magento, plus intranets and vendor appliances nobody remembers installing. There are two relevant CVEs: CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 under CVSS version 4. PHP’s own advisory says they can allow unauthenticated remote code execution. The patches exist; applying them everywhere is the hard part. **Tova (01:12)** Translate that for anyone who doesn’t spend their day reading CVSS scores. What does unauthenticated remote code execution actually mean? **Adrian (01:24)** Someone on the internet can run commands on your server without logging in, without a password, and without tricking a user into clicking anything. They send a request, and your server starts doing something it should never do. That’s the sentence nobody wants to read next to the name of their web server. The NSA’s advisory stresses that these are flaws in PHP itself, not in the hosted application or its configuration. **Tova (01:49)** And this isn’t limited to one vulnerable website or plugin. Who exactly is exposed here? **Adrian (01:55)** It’s very broad. All PHP installations serving web requests are potentially at risk. The advisory names PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP—which many of you may never have heard of before—and LiteSpeed. The risk is highest for mod_php, where PHP says there is a demonstrated exploit in which an unauthenticated request can trigger the attack before any application code runs. **Tova (02:26)** Hang on. Before the application code even runs? That sounds like a pretty important distinction. **Adrian (02:33)** Most of what we call web application security assumes the attacker has to get through your application: input validation, framework protections, code review, the authentication layer. If the flaw fires while PHP is still handling the request, before your code is even invoked, all of that is standing in a room that the attacker never enters. **Tova (02:57)** So you’ve essentially put an alarm on the front door, and the burglar just comes through the wall. Fantastic. It’s like the Kool-Aid Man, but evil. **Adrian (03:05)** That’s about right, to be fair. Edge controls can still look at the request, and vendors are shipping detection rules, which I’ll come back to. But your application layer has nothing to say about it. **Tova (03:17)** Let’s unpack the two vulnerabilities. What’s going wrong under the hood without turning this into an instruction manual? **Adrian (03:25)** Neither of us is going to describe exploitation, and PHP’s advisory doesn’t either. At the level the project has published, CVE-2026-109618 is described as remote code execution via out-of-memory corruption. When PHP runs out of memory partway through a request, it can be interrupted while its internal request data is only partly set up. Cleanup then treats that half-built data as if it were valid. **Tova (03:51)** So it’s the cleanup process itself that breaks. PHP tries to recover from a problem and ends up creating a much bigger one. **Adrian (03:58)** Exactly. And the second is the same theme from a different direction. CVE-2026-109619 is remote code execution via stale global state. Request-owned internal state can survive after its memory has been freed, and a later request on the same worker can use it before normal initialization takes place. That’s why worker reuse matters. One workaround in the advisory is limiting each worker to a single request. **Tova (04:29)** Are both vulnerabilities equally dangerous across all of these different PHP setups? **Adrian (04:35)** No, and the advisory is careful about what has been shown. For the out-of-memory flaw, PHP’s analysis says PHP-FPM is susceptible, but no complete exploit against FPM has been demonstrated. For the stale-state flaw, PHP says a session lifecycle route was validated against both mod_php and FPM, with the FPM path depending on a suitable application operation. So mod_php is the sharp end. FPM is not a safe harbor, though. **Tova (05:08)** Okay. How far back are we talking? Some of the early warnings mentioned PHP 5. **Adrian (05:16)** Early reporting, including from CERT-EU and the Australian Cyber Security Centre, said all versions from PHP 5 onward could be affected. That was before details were published, so treat it as a hedge rather than a precise range. What’s firm is the fix list: PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, all released on October 21. **Tova (05:41)** And what happens if you’re still running an older version? Because I suspect there are quite a few PHP 7 servers out there. **Adrian (05:47)** There are. As the advisory says, PHP 8.1 and older no longer receive updates from the project. But given the severity, the PHP security team published minimal source backports for 7.4, 8.0, and 8.1, aimed at people building from source or without a long-term support vendor. Some distributions and vendors are providing their own backports, so check with yours. **Tova (06:11)** And a source backport isn’t exactly the same thing as getting a tested update through your normal package manager. **Adrian (06:18)** Not remotely. If you’re running an end-of-life branch, you’re taking on risk with every one of those options. The honest answer is that you need an upgrade plan. One more date for the diary: PHP 8.2 reaches end of life on December 31 this year. The release notes already say so. **Tova (06:36)** What did the actual fix change? Can we explain that without getting lost in the internals? **Adrian (06:42)** Datadog security researchers published an analysis. As they describe it, the fix changes how memory exhaustion interrupts execution. A soft limit now defers the error until PHP reaches a safe point. A higher hard limit ends the worker immediately instead of running normal cleanup over data that might be invalid. The patch also resets request-owned state before anything can reuse it. The project says it fixes the issue at the source. **Tova (07:09)** Now, the timeline here is interesting because the warnings started before the patches were even available. Let’s explore that a little bit. **Adrian (07:16)** On Tuesday the 20th, the PHP security team published an advance notice: an upcoming release for two critical vulnerabilities, both rated 9.2, scheduled for Wednesday at 2 p.m. UTC. They also said they reserved the right to release earlier if details leaked or exploitation appeared. CERT-EU published advisory 2026-018 the same day, and it named both CVE identifiers. **Tova (07:45)** What were organizations supposed to do in that window when they knew the problem was coming but couldn’t patch yet? **Adrian (07:51)** Three things: identify every PHP application in the estate and be ready to patch them all at once. If you can’t patch, consider isolating internet-facing applications from public networks. And if you can’t patch quickly, consider taking websites offline. **Tova (08:08)** Telling organizations to take entire websites offline is a pretty serious recommendation. What did that signal to you? **Adrian (08:16)** The people who had seen the advance material thought the exposure was serious, Tova. And it wasn’t only advice. Reporting at the time said some large Japanese sites went into maintenance mode ahead of the release window so they could patch the moment the fixes landed. That’s operational disruption over a vulnerability with no confirmed victims, and it tells you how the people closest to it were reading the risk. **Tova (08:39)** Which brings us to the obvious question: How do we know whether anyone’s actually exploiting this today? **Adrian (08:46)** We need to be very careful here. Here’s what I can say with confidence: The Australian Cyber Security Centre said it was not aware of successful active exploitation within Australia. No threat actor has been attributed. As of last Wednesday, neither CVE was on CISA’s Known Exploited Vulnerabilities Catalog, though that may have changed by the time listeners hear this. **Tova (09:08)** What are the signals we’re seeing, at least at the time of this recording, even if they haven’t been independently confirmed? **Adrian (09:15)** Quite a lot. The SANS Internet Storm Center diary says Cloudflare is reporting exploit attempts and that proof-of-concept exploits and details have been published. Datadog’s write-up cites AWS reporting attempts as early as the 17th, four days before disclosure. Those are secondary reports, so I’d call them credible signals rather than established fact. The sensible planning assumption is that somebody is already probing this vulnerability. **Tova (09:42)** That’s the difficult part, isn’t it? Not having a confirmed victim doesn’t mean that nobody’s been compromised, especially if we’re still figuring out what to look for. **Adrian (09:51)** Same logic, Tova. Nobody has confirmed a compromise. My read is that this is partly because nobody is certain what a compromise would look like in their logs yet. A PHP worker getting corrupted isn’t going to produce a tidy alert. You find it from what happens afterward. **Tova (10:09)** And the NSA has gone as far as saying attackers are likely to weaponize PHP2Shell. How much weight should the audience put on that? **Adrian (10:20)** It’s an assessment, not an observation, and I want to keep those separate. But it’s a significant assessment. The advisory asks organizations to inventory anything internet-facing that depends on PHP, add enhanced logging, and replace end-of-life PHP services that can’t be patched. If an immediate update isn’t feasible, it recommends taking the system offline until it can be fully mitigated. That’s consistent with what CERT-EU and the ACSC were saying. **Tova (10:47)** Let’s turn that into something practical. If you’re on a security team listening to this, where do you start? **Adrian (10:53)** Inventory, because you can’t patch what you can’t find. Not just the web servers you know about: content management systems, e-commerce platforms, intranets, containers built from old images, third-party hosted sites, and vendor appliances with PHP embedded. Start with internet-facing systems. The usual failure is that the asset list stops at the servers the infrastructure team owns, and the marketing site on the hosting provider’s platform is nobody’s responsibility. **Tova (11:19)** So first find everything, then patch it. Although I’m guessing even that isn’t quite as straightforward as it sounds. **Adrian (11:26)** The fixed versions are the four I listed, or your distribution or vendor’s packages. Linux distributions and long-term support vendors got the fixes before the public release, so check your own channel first. One example from the advisory: the volunteer-maintained Remi repository said it would not have updates on release day, and PHP told people to switch to distribution packages or build from source. And in container estates, patching means rebuilding images and redeploying, not just updating a host. **Tova (12:00)** For the teams that can’t patch immediately, what about the workarounds? How much protection do they actually buy you? **Adrian (12:07)** The project lists them and is very clear about their limits. They reduce exposure to specific attack paths but do not make an installation safe. The release notes say updating is the only safe choice. For the memory flaw, that includes setting the memory limit to unlimited, which sounds backwards. It removes the controllable failure PHP would otherwise hit, but the advisory warns that an underlying allocation failure can still reach the vulnerable path. **Tova (12:34)** Sorry, unlimited memory? That sounds like the opposite of a security recommendation. Explain that one. **Adrian (12:41)** The attack depends on PHP hitting its own memory limit mid-request. Remove that limit and you remove the easiest way to trigger it, but then you need something else to stop a single request from eating up the machine. The advisory says to use a container or cgroup limit as an availability boundary, ideally one that kills only the affected worker. It specifically warns against address-space resource limits because those can cause a failure themselves. **Tova (13:10)** What’s the temporary fix for the second vulnerability? **Adrian (13:14)** Switch off the session upload progress feature, restart every worker, and set it somewhere that applies before request parsing, not at runtime. On PHP 8.5, disable fatal error backtraces. The advisory is explicit that these are temporary measures. They’re worth applying if you must, but you still need to update. **Adrian (14:18)** So what comes next? The attacker’s goal is a foothold on the web server, and foothold behavior is more predictable than the vulnerability. I’d look for a web shell in a web-accessible directory—MITRE ATT&CK technique T1505.003—commands run by the web server process, and outbound connections from that process. That’s expected behavior, not something confirmed in the reporting. New or modified PHP files in web directories are worth hunting for as well. **Tova (14:58)** Web servers make outbound connections to just about anywhere, don’t they? **Adrian (15:03)** That’s the question. In plenty of estates, yes, because nobody ever restricted egress from the web tier. If a web worker can’t freely reach the internet, an attacker with code execution has a harder time deploying a second stage. Tight egress rules can make a compromise easier to contain. Vendors have published detection signatures and firewall rules too. Treat those as tripwires, not fixes. **Tova (15:31)** Let’s make this concrete. Say it’s any weekday morning, you’re the CISO, and you’ve got five minutes with your team to address this. What are the three questions you ask? **Adrian (15:43)** First, can you list every PHP runtime you operate or depend on, and what version it’s running? Second, for the ones you can’t patch this week, what is the compensating plan, and who owns it? Third—and this is the uncomfortable one—if someone did get code execution on a web server tomorrow, would you know about it? Would the shell spawn alerts? Would the outbound connection be blocked? And would you be on it in time? **Tova (16:10)** And that last question is the one I’d want to prove, not just get a reassuring answer to. **Adrian (16:15)** It is. The defenders I’ve worked with exercise the chain after the foothold, not just the rule on paper: a web shell landing, commands running from the web process, and data going out over HTTP. That’s the kind of thing SafeBreach customers do with the Hacker’s Playbook. I’m deliberately not talking about product coverage for these specific CVEs today. The principle holds on any platform, though: When did you last validate that your controls stop a web-tier foothold? **Tova (16:43)** Makes sense. Now, Adrian, before we wrap up, what are you keeping an eye on next? **Adrian (16:49)** Four things: – Whether CISA adds either CVE to the Known Exploited Vulnerabilities Catalog, which would indicate confirmed exploitation. – Whether anyone demonstrates a complete exploit against PHP-FPM, because that’s where many modern stacks run. – Whether the first public incident is attributed to a named actor. – What happens on December 31, when PHP 8.2 stops getting fixes, because a lot of organizations will still be using it. **Tova (17:24)** A patch is available, but that doesn’t mean the risk has disappeared. Find the PHP instances you didn’t know you had, get them updated, and make sure you’d spot a compromise if one happened. Adrian, thank you so much for filling us in on this very big and developing story today. And listeners, until next time, stay safe. Stay safe with SafeBreach.
In This Episode
Two critical PHP flaws can let an unauthenticated attacker run commands on your web server, and on Apache mod_php, it can happen before your application code even loads.
In this episode of The Cyber Resilience Brief, host Tova Dvorin and Adrian Culley break down PHP2Shell (CVE-2026-109618 and CVE-2026-109619) and what security teams should do now.
• What PHP2Shell is and why unauthenticated command execution on the web tier matters
• Why Apache mod_php deployments are exposed before application code runs
• Which PHP configurations are affected
• Why PHP’s maintainers say updating is the only safe fix
• How to handle end-of-life PHP versions that no longer receive patches
• Three questions CISOs should ask about a web-tier compromise
Update: Researchers reported the first successful in-the-wild exploitation on October 26, 2026.
If your organization runs PHP-based web applications, across e-commerce, financial services, healthcare, or SaaS, this episode is a practical guide to finding your exposure and prioritizing remediation.
Additional resources:
SafeBreach coverage of PHP2Shell: https://www.safebreach.com/blog/php2shell-cve-2026-109618-cve-2026-109619-safebreach-coverage/
Subscribe on Your Preferred Platform
You Might Also Be Interested In







