Critical PHP and Node.js flaws php2shell + node2shellTest my domain
PHPRCECVEVulnerabilityWordPressWeb hosting

php2shell: the full story of the two RCE flaws in PHP core

php2shell (CVE-2026-109618 and 109619): two RCE flaws in PHP core, patched 21 October 2026, exploited in the wild (CISA KEV). Fixed versions, safe check.

by Updated on 55 min read
php2shell: the full story of the two RCE flaws in PHP core

The essentials, updated as it unfolds

Last update: 9 November 2026. We have been tracking this affair since the leak of 20 October. Here is the current state, most recent on top. The full account and the technical analysis follow.

  • 9 November: working exploits, seen against honeypots. Still no new PHP release.
    • GreyNoise saw one of its deliberately vulnerable sensors exploited for the first time on 28 October at 05
      UTC: Apache spawns a shell, which runs a curl back to the attacker's address. On the morning of 9 November its tracker counts 1,215 successful exploitations, from just five addresses, out of 683 attacking addresses and a little over 255,000 sessions. On 29 October one of them went further: reverse shell, a script dropped in /tmp, then an inventory of the machine (accounts, Docker, SSH keys, cron jobs).
    • GreyNoise was not the first. BleepingComputer reported on 26 October the capture made by Adel Karimi, at Perplexity: full code execution on a honeypot, with an 800 KiB memory dump returned in a cookie before the final payload. The profile was "intentionally favorable", Apache with mod_php, a single worker, PHP 8.4.26. Both observations predate our 5 November update, where we still wrote that public exploits did not work: that needed qualifying.
    • What this changes, and what it does not. These are honeypots, built to be vulnerable in the most exposed configuration; no mass compromise of production servers is confirmed, as Intel 471 still noted on 30 October. But working exploits are circulating, in few hands. Intel 471 reports that an initial access broker tied to ransomware groups claims to have one and is recruiting, while other actors say they are building target lists. Those are forum claims, not established facts.
    • On the PHP side, nothing new: as of 9 November, 8.5.13 and 8.4.28 still exist only as release candidates, and PHP 8.6.0 is announced for 19 November. CVE-2026-115560 therefore has no published fix yet. Keep session.upload_progress.enabled=0.
    • Devices are moving faster than we feared in Palo Alto's case: it finished shipping its fixes on 29 October for every maintained PAN-OS branch, from 10.2 to 12.2. For the rest, the Dutch NCSC's list was tracking 948 products on 6 November: 187 fixed, 215 still vulnerable, 91 under investigation, and 240 whose exposure depends on the PHP they are installed on.
    • The estate is splitting in two. Bitsight rescanned 9.5 million vulnerable hosts a week after the fix: 68.6% of those on a maintained branch were patched, against 6.4% on end-of-life branches. All together, the curve flattens out around 38%.
  • 5 November: the first confirmed intrusion hit firewalls, not websites.
    • Dream Research described on 26 October (updated on the 29th) a campaign that gained root on 25 Palo Alto Networks PAN-OS firewalls and management servers in the United States, Japan, Taiwan and South Korea, including three servers in a US government-affiliated environment. The attacker got in through php2shell on the firewall's management interface, which embeds PHP 8.0, via the upload progress mechanism, then became root with a Linux kernel flaw, Fragnesia (CVE-2026-46300). Unit 42, Palo Alto's research team, says it independently verified the tooling and confirmed the results. The vendor's advisory reports active exploitation against management interfaces exposed to the internet, and CERT-FR relayed it on 28 October (CERTFR-2026-AVI-1402). No actor is named: Dream describes a campaign that "appeared to be" Chinese and AI-assisted, without attributing it. This report was public at the time of our 28 October update, and we missed it.
    • It is the shift ANSSI, the French national cybersecurity agency, flagged on 28 October in a statement relayed by AFP: one should not "consider the problem definitively solved". Websites have been patched; the risk is moving to routers, firewalls, NAS and cameras that embed PHP for their console, and that only get updated with the manufacturer's firmware. The agency counts more than 660,000 IP addresses serving PHP in France.
    • On web servers, nothing has tipped over: still no confirmed mass compromise. Intel 471 tested a public exploit against a production configuration (ASLR on, errors hidden) and got code execution once in about two dozen attempts. Unit 42 also retracted, on 25 October, a link between an intrusion at a European government agency and php2shell, as it could not confirm it: the second retraction, after Sophos.
    • A third vector still needs closing, CVE-2026-115560. In an advisory of 23 October, PHP calls it unlikely (an application has to switch its session serialisation format at runtime, with upload progress enabled), but recommends setting session.upload_progress.enabled=0 until the next release. If you did so on the 21st, leave it alone. Release candidates 8.5.13 RC1 and 8.4.28 RC1 came out on 3 and 4 November with the garbage collector regression fix; the final releases are not out yet.
    • The tail is long. According to Censys, more than 11 million services had moved to a fixed version by 29 October, but more than 30 million still reported an affected one, three quarters of them on 8.1 or older. Next, a French outlet, counted at least 250,000 .fr domains advertising a vulnerable version.
  • 28 October: CISA acknowledges active exploitation, public proofs of concept circulate.
    • CISA added both CVEs to its catalogue of actively exploited vulnerabilities (KEV) on 26 October, with a three-day remediation deadline, and updated its PHP alert. That is a genuine change of status: until then, we were noting their absence from the catalogue. Under Binding Operational Directive 26-04, US federal agencies must now not only patch, but check that no attacker compromised their systems before the fix was applied.
    • Rapid7 describes several public proofs of concept now available, and Amazon Threat Intelligence says it observed an exploitation attempt as early as 17 October, four days before disclosure.
    • One caveat still stands: a KEV listing reflects CISA's assessment, not a public report of a successful intrusion, which is still missing from the sources we follow, and public exploits remain unreliable against a default install. But the official signal has flipped, and the window to patch at leisure has closed.
  • 25 October: a private exploit defeats ASLR, botnet operators join in.
    • VulnCheck announced an exploit that reaches code execution on x86-64 with ASLR enabled and PHP error display turned off, in other words the recommended production setup, by leaning on the memory leak. It is not public: it is limited to its Initial Access Intelligence customers. The vendor says it is "not aware of any other public or commercial exploit that achieves RCE on multiple versions of PHP," while expecting that to change.
    • Mirai-style operators have joined the attempts: Sophos saw payloads trying to deploy "Potassium," a suspected Mirai variant, intercepted before it reached its target; Hunt.io and Arctic Wolf tie that traffic to a botnet active since the spring, with no confirmed compromise.
    • The bottom line does not move: no successful intrusion publicly confirmed, public exploits still inert against a default install, and both CVEs still absent from CISA's catalogue in the available reporting. But the gap we flagged is narrowing: the most accessible primitive, the memory leak, is now weaponised, even if privately.
  • 24 October: nothing tipped over, three days after the fix.
    • 8.5.12 is still the latest version; the 8.5.13 and 8.4.28 that will fix the garbage-collector regression are not out yet (we are watching php.net for them).
    • Neither CVE has been added to CISA's catalogue of actively exploited vulnerabilities.
    • In the sources we track, still no publicly confirmed successful intrusion, despite massive attempts.
    • The course of action does not change: apply 8.5.12 (or your branch's equivalent), then 8.5.13 for the regression.
  • Still no new PHP release, but the fix broke something.
    • As of 23 October, the latest version is still 8.5.12 (and 8.4.27, 8.3.36, 8.2.35).
    • The fix introduced a confirmed regression: on 8.4.27 and 8.5.12, the garbage collector can free a SimpleXMLElement object's property table twice and corrupt the heap.
    • The result: perfectly legitimate applications crash. A json_encode followed by a json_decode on an XML object is enough.
    • The bug was opened on 21 October, fixed in the repository on the 22nd, and will ship in the upcoming 8.5.13 and 8.4.28 releases.
    • It is not a security flaw. If your estate crashes after updating, this is probably it, not an attack.
  • Millions of attempts, no confirmed compromise.
    • Cloudflare went from a few thousand attempts before the announcement to "millions" on 22 October.
    • Wordfence blocked more than 74,000 requests across its WordPress estate.
    • As of 23 October, no successful intrusion has been publicly confirmed. Sophos even retracted its report of a compromise at a customer after checking.
    • Public exploit code fails against a default PHP install.
    • The flaw was still not on CISA's catalogue of actively exploited vulnerabilities (re-checked on 24 October).
  • In France, public websites still in maintenance.
    • On the morning of 23 October, the tax authority's site, several prefectures and the family benefits agency were still showing a maintenance page.
    • Météo-France and the Ameli home page had come back online the evening before.
    • Orange took sites and apps of several of its subsidiaries offline as a precaution.
    • CERT-FR updated its CERTFR-2026-ALE-014 alert on 22 October to flag the existence of proofs of concept.
  • One claim to watch, but no proof of RCE.
    • A researcher published a screenshot of a memory crash obtained on the fixed 8.5.12.
    • At this stage, nothing links that crash to the two fixed flaws.
    • The Dutch NCSC writes that it has "no indication that the available patches insufficiently fix the vulnerabilities." We detail this point below.
  • The bedrock, confirmed since 21 October.
    • Two remote code execution flaws in PHP core: CVE-2026-109618 and CVE-2026-109619, rated 9.2 on CVSS v4.0.
    • Fixed on 21 October by 8.5.12, 8.4.27, 8.3.36 and 8.2.35, with source backports for 7.4, 8.0 and 8.1.
    • Updating remains the only complete protection.

Part one: the story of a flaw

On the afternoon of 20 October 2026, an anonymous message appeared on Hacker News. The title: "Tell HN: 2x PHP RCE CVEs with CVSS 10.0 Incoming". Two remote code execution flaws in PHP, two reserved CVE numbers, a maximum score, a date. As for a source, the author wrote plainly that he had "no evidence beyond 'source: trust me, bro'".

Screenshot of the anonymous message posted on Hacker News on 20 October 2026, titled "Tell HN: 2x PHP RCE CVEs with CVSS 10.0 Incoming", announcing two remote code execution flaws in PHP, citing the identifiers CVE-2026-109618 and CVE-2026-109619, and admitting it has "no evidence beyond source: trust me, bro".

Within hours, this "trust me, bro" message would take French prefecture websites offline, knock out part of the Dutch Parliament and the British administration, and trigger the emergency release of a fix scheduled for two days later. Because the rumour was true. And because PHP runs, according to W3Techs, a little more than two in three websites whose server-side language is known.

Here is how we got there.

2004 to 2024: the seed, planted twice

The story does not begin in 2026. It begins in 2004, when Stefan Esser, then a leading figure in PHP security, published his advisory 11/2004: "PHP memory_limit remote vulnerability". The core idea is already there, intact: force the interpreter to exceed its memory limit during request processing, before the script even starts, leaving it in an inconsistent state an attacker controls. The flaw was serious enough that Esser declined to release his exploit.

A panel from a comic strip published by Calif to tell the php2shell story: an elephant, PHP's mascot, drawn from lines of code, captioned "an ancient PHP artifact".

The same pattern resurfaced in 2019, in php-src bug report number 78876: long variables in a multipart/form-data form cause an out-of-memory condition, and temporary files are not cleaned up. The symptom was fixed in 2020, not the deep cause.

Then came 2024. PHP underwent its first external security audit, funded by the Sovereign Tech Agency, organised by OSTIF and carried out by the French firm Quarkslab. While fixing one of the audit's findings, a core developer glimpsed the corruption tied to running out of memory. Several fix approaches were considered, each with a compatibility cost, and with no demonstrated path to code execution, the matter was postponed. Again and again. The PHP Foundation would admit as much, a year and a half later, without hiding behind its little finger: "We won't pretend otherwise: the delay was a structural failure."

Summer 2026: three teams, AI models, and the same flaw

On 30 July 2026, Ryan Austin, a researcher at Calif known by the handle @lcfr_hax, joined "Patch the Planet", an OpenAI initiative inviting security teams to audit critical open source software with help from its models. PHP was an obvious target. On 1 August, he found the first bug. On the 5th, he published on X the cryptographic hash of his finding, a way to date the discovery without revealing it. On 11 August, he reported it to PHP's security team.

In a coincidence that is not really one, OpenAI reported the same root cause on the same day, both through the same programme. Two weeks later, on 24 August, it was Wiz's turn, whose team (Sagi Tzadik, Shir Tamari, Nir Ohfeld, Tomer Schwartz) reported further attack vectors. Wiz summed up the moment in one dizzying sentence: a single researcher, assisted by state-of-the-art AI models, completed in a week what would have taken a world-class team months.

What the models really brought, according to Ryan Austin, was not finding "all the bugs" from a simple prompt. It was generalising a pattern into a reusable rule: publish or destroy some state, do work that can fail, then only afterwards initialise, commit or restore. When the failure strikes in the middle, the final step is skipped, and the next request trusts a false state. Even so, you still had to know the history of PHP flaws, Esser and the 2019 bug included, to steer the machine to the right place.

PHP's security team, which decides by consensus, took weeks to choose among the candidate fixes. The coordinated release was set for Thursday 22 October, 14

UTC. Linux distributions and major providers were warned in advance. Cloudflare had been quietly building its blocking rules since the start of the month. Everything was under control. Until Monday evening.

20 October: the leak

The Hacker News message landed at 15

UTC. It was quickly pulled from the front page, but the screenshots were already circulating. In the thread, a well-known PHP contributor let slip: "It was leaked."

At 18

UTC, watchTowr, a security firm known for its plain speaking, publicly confirmed what everyone had been dreading.

Screenshot of watchTowr's message on X, 20 October 2026: "We were all supposed to wait until Thursday at 11am ET. Information has leaked wrt zero-day embargoed RCE vulns in PHP. We can confirm that they're real. Take this seriously and apply patches when available."

At 19

UTC, PHP's team published an advance notice: the release was brought forward by a day, to Wednesday 21 October at 14
UTC
. The team reserved the right to publish even earlier if details became public. They did, within the minute.

Around 20

UTC, Calif accidentally published a demonstration video of its exploitation tool, pulled immediately but widely copied. It shows the exploit falling in cascade against WordPress, phpBB, Magento, Laravel, Symfony. At 20
, researcher Kirill Firsov reshared it and gave it the name that would stick, taken from a tool visible in a leaked screenshot: php2shell.

The flaw's name was now travelling faster than its fix. That is the exact opposite of responsible disclosure, where you hand defenders the patch before you hand attackers something to work with.

The night of the 21st: the race against the exploit

At 03

UTC, nine hours before the scheduled publication, Cloudflare switched its firewall rules to blocking mode, for all its customers, free tier included. They named neither PHP nor the flaw, embargo oblige.

Screenshot of Cloudflare's blog post of 21 October 2026, "Cloudflare deploys protections against php2shell vulnerability": the company explains it developed its web application firewall protections since early October with the PHP Foundation, OpenAI and Wiz, and enabled them by default for free and paid plans from 21 October at 03 UTC.

Then the embargo tore for good. At 07

UTC, Chainguard published already-patched container images, more than six hours before the coordinated release, handing anyone who can read a diff the recipe for the bug. The PHP Foundation would scold it sharply; Chainguard would reply it had "made the call when exploits started to hit", a claim PHP's board contested.

Around 07

, the first attacks were reported by Patchstack and by Cloudflare's CTO. It would later emerge that Amazon's honeypot had recorded a first attempt as early as 17 October, four days before disclosure. Around 10
UTC, in the Netherlands, several sites went dark voluntarily rather than wait: the outlet Tweakers, part of the Parliament, the national cybersecurity centre. Finland followed. Then France.

14
UTC: the fix, and the admission

At the appointed hour, PHP published 8.5.12, 8.4.27, 8.3.36 and 8.2.35, plus source backports for the 7.4, 8.0 and 8.1 branches. The two flaws finally had a face.

Screenshot of the GitHub security advisory GHSA-w8hw-w9fx-j79w for CVE-2026-109618, "RCE via OOM corruption", published by a PHP maintainer: it lists the affected versions (below 8.2.35, 8.3.36, 8.4.27 and 8.5.12), the fixed versions, a CVSS score of 9.2 out of 10 at critical severity, and credits researchers from Calif, Wiz and OpenAI.

The same day, the PHP Foundation published a post of rare honesty. It recounted the 2024 audit, the problem glimpsed and then postponed, and called the delay a "structural failure" of its own decision process. It announced, in the same breath, an ecosystem security team, new hires, and a move from consensus to majority decisions.

Screenshot of the PHP Foundation's post of 21 October 2026, "Today's PHP Security Release, and How We're Strengthening PHP Security", which describes the two critical remote code execution vulnerabilities, acknowledges that the first signs dated back to a 2024 audit, and announces a strengthening of PHP's security organisation.

Two AI-assisted researchers, a bug more than ten years old in the code and two years old in the team's memory, a leak that rushed everything, and a vendor owning up the same day. The affair could have ended there. It did not.

The aftermath: France pulls the plug, the fix cracks

On the afternoon of 21 October, at the request of ANSSI, France's cybersecurity agency, the Interior Ministry placed all of its exposed sites into "preventive maintenance", prefectures included. Météo-France closed its own, forecasts and weather warnings included. The tax authority's site also showed a maintenance page. This was not an attack, it was a voluntary shutdown while the fix was applied. In its statement, ANSSI gave a sense of the French estate: more than 600,000 servers on the French internet run PHP. CERT-FR updated its alert the next day to flag the appearance of proofs of concept.

Screenshot of CERT-FR's CERTFR-2026-ALE-014 alert, "Multiple vulnerabilities in PHP", whose document management shows a first version on 21 October 2026 and a latest version on 22 October 2026, a risk of arbitrary remote code execution, and a list of affected systems covering all PHP versions from 5.x to 8.5 before the fixes.

The shutdown was not only a French affair. In the United Kingdom, a minister told the House of Lords that thirty-two government services were unavailable. In Japan, the Prime Minister asked for action "tonight". Public sites went down, as a precaution, in Canada, Australia, Belgium, Germany.

And all the while, two things were confirmed, contradictory on the surface. On one side, the deluge: Cloudflare went from thousands of attempts to "millions", the payloads mutating to bypass its rules. On the other, the void: nobody confirmed a successful intrusion. Sophos announced a compromise at a customer, then retracted it a few hours later. Public exploit code crashed. The flaw did not make it onto CISA's catalogue of actively exploited vulnerabilities.

One last twist remained, which says a lot about the nerves of those days. A few hours after the fix, researchers published screenshots of crashes on the fixed 8.5.12.

Screenshot of a message relaying researcher Elise, titled "still works on 8.5.12!": a terminal shows an AddressSanitizer double-free crash in PHP's memory allocator, zend_alloc.c. Below it, another message announces "PHP Patch is out!!" with the commit hashes of the fix for versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35.

A one-night panic? Partly. Let us untangle it. The fix, published in a hurry and touching nearly four hundred files, did indeed introduce a regression, confirmed in PHP's repository: on 8.4.27 and 8.5.12, the garbage collector can free a SimpleXMLElement object's property table twice and corrupt the heap. The bug was opened on 21 October, verified the same day, and fixed on the 22nd. It will crash perfectly legitimate code, but it is not a security flaw, and it will ship in the upcoming 8.5.13 and 8.4.28 releases. The crash screenshots "on 8.5.12" that circulated, for those we could cross-check, relate to that regression or to neighbouring memory bugs, not to a remote code execution that would have survived the fix. The Dutch NCSC is clear: no indication the patches insufficiently fix the flaws. The course of action does not change. Apply 8.5.12, which certainly closes the two published CVEs, and keep an eye on php.net for the 8.5.13 that will settle the regression.

What came next defied the forecasts, ours included. Everyone was watching for the first compromised website. The first confirmed intrusion came through Palo Alto firewalls, whose management interface runs on a PHP 8.0 their owners never see: twenty-five machines rooted by 24 October at the latest, at the end of a campaign prepared since the 8th, by chaining php2shell with a Linux kernel flaw. A security appliance, exposed to the internet against every recommendation, whose PHP only gets updated with the firmware. That is exactly the asset inventories forget when they count "our PHP servers".

Timeline

From the 2024 audit to the leak, to the fix, and its aftermath

Before

  1. 2004

    Esser's advisory

    Stefan Esser describes the first remote code execution tied to memory_limit. The underlying idea is already there.

  2. 2024

    Quarkslab audit

    while fixing a finding from the audit funded by the Sovereign Tech Agency, a core developer glimpses the corruption tied to running out of memory. No concrete vector, the matter is postponed.

The discovery

  1. 30 July 2026

    Calif joins Patch the Planet

    Ryan Austin targets PHP as part of OpenAI's programme.

  2. 11 August 2026

    Calif and OpenAI report

    the same root cause is reported to PHP on the same day, by two actors in the same programme.

  3. 24 August 2026

    Wiz reports

    further attack vectors. A single researcher, AI-assisted, completed in a week the work of a team's months.

The leak

  1. 20 October 2026, 15 UTC

    Hacker News post

    two PHP RCEs announced with the reserved CVEs and a score of 10.0, with no proof. Pulled, but copied.

  2. 20 October 2026, 18 UTC

    watchTowr confirms

    "We can confirm that they're real."

  3. 20 October 2026, 19 UTC

    PHP's advance notice

    the release is brought forward to 21 October at 14 UTC.

  4. 20 October 2026, ~20 UTC

    Calif's video accidentally published

    the demonstration appears for a few minutes before being pulled. Kirill Firsov reshares it at 20 and names it php2shell.

The race

  1. 21 October 2026, 03 UTC

    Cloudflare rules for everyone

    protection goes to blocking mode on all plans, nine hours before publication.

  2. 21 October 2026, 07 UTC

    Chainguard breaks the embargo

    patched images are published more than six hours before the coordinated release, and the diff with them.

  3. 21 October 2026, ~07 UTC

    First attacks reported

    Patchstack and Cloudflare see the first attempts. Amazon's honeypot had seen one as early as the 17th.

  4. 21 October 2026, ~10 UTC

    Sites go offline

    in the Netherlands, Tweakers, part of the Parliament and the cybersecurity centre pull their sites. Finland follows.

The fix

  1. 21 October 2026, 14 UTC

    Publication

    PHP ships 8.5.12, 8.4.27, 8.3.36 and 8.2.35, plus source backports for 7.4, 8.0 and 8.1. The two causes are finally described. The PHP Foundation admits a "structural failure".

  2. 21 October 2026, afternoon

    France pulls its public sites

    at ANSSI's request, prefectures, Météo-France and the tax authority go into preventive maintenance.

The aftermath

  1. 22 October 2026

    The fix cracks, not the exploitation

    a garbage collector regression is confirmed and fixed in the repository; Sophos retracts its compromise report; still not on CISA's catalogue.

  2. 23 October 2026

    Still in maintenance

    on the morning, the tax authority, several prefectures and the family benefits agency still show a maintenance page in France. Météo-France and Ameli are back.

  3. 24 October 2026

    First confirmed intrusion

    twenty-five PAN-OS firewalls and servers are rooted through php2shell and Fragnesia. Dream Research reports it on the 26th, Unit 42 verifies it on the 29th.

  4. 26 October 2026

    Added to CISA's catalogue

    both CVEs join the KEV, with three days to patch.

  5. 28 October 2026

    ANSSI warns

    the problem is "not definitively solved", the risk moves to devices that embed PHP.

  6. 28 October 2026

    A honeypot exploited for real

    GreyNoise sees one of its vulnerable sensors run an attacker's command. More than 1,200 successful exploitations by 9 November, from five addresses.

Two years between the first signs and the fix, two months of coordination under embargo, thirty-six hours between the broken embargo and publication, then days in which part of the French administration stayed offline.

The comparison that comes to mind is CVE-2024-4577, the argument injection in PHP-CGI on Windows disclosed in June 2024: Akamai had observed the first attempts on its honeypots within twenty-four hours, and ransomware was exploiting it within the week. That flaw only affected one specific configuration. php2shell affects the default configuration. The difference, this time, is that reliable exploitation is far harder to industrialise.

Part two: the technical side

Enough of the story. Let us see how these two flaws work, who they affect, and what that means for you.

In one sentence

The mechanism: two memory bugs, one fix

Both php-src advisories describe two distinct memory-handling bugs, not the multipart parser use-after-free that the morning rumour assumed. They are fixed by a single patch, soberly titled "Avoid state corruption via bailout", which touches nearly four hundred files and replaces the brutal exit on out of memory with a clean unwind.

  • CVE-2026-109618, "RCE via OOM corruption". When an allocation fails, PHP exits the request through a long jump (longjmp) that abandons everything, leaving the request's memory in an invalid state. The end-of-request cleanup then reads that state as if it were valid. A subtlety that widens the surface: the failing allocation does not need to relate to the corrupted memory, it only needs to occur while a structure is published but unfinished. A carefully crafted multipart request can trigger that out-of-memory condition while staying under post_max_size.
  • CVE-2026-109619, "RCE via stale global state". A global state kept by the worker keeps pointing at request memory that has already been freed. A later request, on the same worker, consumes that stale value before normal reinitialisation. Upload progress tracking (session.upload_progress) is one of the paths that lead there, not the cause; on PHP 8.5, the fatal error backtrace is another, and it is the one whose code execution was confirmed.

Both are fixed in 8.5.12, 8.4.27, 8.3.36 and 8.2.35, and backported in source for 7.4, 8.0 and 8.1.

Wiz's post, published with the fix, details four primitives grouped under these two CVEs:

  1. a use-after-free in the upload progress deserializer;
  2. a remote process memory disclosure: a session ID pointer is left dangling after an out-of-memory abort, and later requests read it as live data, returning in a response cookie an attacker-chosen amount of memory, with whatever other requests left there (passwords, tokens, API keys, certificates);
  3. a use-after-free in the PHP 8.5 fatal error backtrace;
  4. a type confusion in OPcache, across workers.

The memory disclosure stands on its own, without code execution: it is the most accessible primitive, and the most worrying at scale. An unpatched server can leak without any suspicious file appearing.

The advisories specify who is most exposed. On mod_php, code execution is demonstrated for both flaws, with default limits, because the process runs the cleanup even after a startup failure. On PHP-FPM, which kills its child when initialisation fails, no complete exploit was demonstrated for 109618, but RCE via the session lifecycle (109619) was validated. FrankenPHP is judged likely exposed like mod_php, LiteSpeed like FPM. Multiple workers and their recycling lower the success rate, not the risk.

The discoverers' demonstration

Calif published a video of the exploit with its analysis, reshared by researcher LCFR. It follows the chain end to end to a remote command. We host a copy for documentary purposes: it shows the result, not the recipe, and none of the steps shown is replayed by our scan, which merely reads the advertised version.

The exploit was confirmed in pre-authentication against WordPress 7.1.2, Drupal 11.4.3, Joomla 6.1.4, MediaWiki, Roundcube, Magento 2.4.9, phpMyAdmin, Nextcloud, Laravel and Symfony. Each time, it is the interpreter that falls, not the application.

Kill chain

The php2shell chain, as the advisory confirmed it

Phase 1Unauthenticated request (certain)
  1. 1

    Any reachable .php URL

    one request is enough, with no authentication or upload form on the page.

Phase 2Processing before your code (certain)
  1. 2

    Request initialisation

    PHP reads and processes the body before the script and before any application-level control.

Phase 3Memory corruption (confirmed)
  1. 3

    Out-of-memory exit or stale global state

    a published but unfinished structure, or a pointer that outlives the request, is read back as valid.

Phase 4Code execution or memory disclosure (demonstrated)
  1. Shell as www-data, or memory read

    address leaks to defeat ASLR then a command, or a direct read of the heap's contents.

Any URL served by PHP is in scope, not just the pages that accept files. Our scan replays none of these steps; it only reads the advertised version.

Am I affected? The perimeter, without jargon

The right question is not "does my site use uploads". It is "does any PHP answer over HTTP somewhere on my perimeter, and on which branch".

  • You expose a PHP site or application on the internet, via mod_php, PHP-FPM, php-cgi, FrankenPHP or LiteSpeed: you are on the front line, whatever CMS or framework sits on top. The fix covers branches 8.2 to 8.5. mod_php is the most exposed.
  • You are on PHP 8.1, 8.0 or 7.4: no complete upstream release, but the security team published a source backport for these three branches. And "out of upstream support" does not mean "without a fix": see the note below on distribution packages.
  • You are on an even older branch (5.x, 7.0 to 7.3): no fix, upstream or official backport. Migrate or isolate.
  • You use shared or managed hosting: the host updates PHP. Your job today is to know which version serves you and to ask for their schedule.
  • You expose a device's management console (firewall, VPN, NAS, router, camera): many embed PHP without saying so, and that is how the first confirmed intrusion got in, on Palo Alto firewalls. That PHP only gets updated with the firmware: check your vendors' advisories (the Dutch NCSC keeps a list of affected products) and take these consoles off the internet.
  • You only expose PHP internally, intranet, business tool, appliance console: the risk is lower but not nil. A compromised machine on the network, or a contractor, can reach these URLs.
  • PHP on the command line only (scripts, cron, workers): the vector assumes an HTTP request. This is not exposed to the flaw, update in the normal cycle.

A word on branches, because the support calendar is at the heart of the matter. PHP maintains each branch for four years: two years of active support then two years of security fixes only. As of 21 October 2026:

BranchFixed version (21 Oct. 2026)End of security supportFix
8.58.5.1231 December 2029Upstream release
8.48.4.2731 December 2028Upstream release
8.38.3.3631 December 2027Upstream release
8.28.2.3531 December 2026Upstream release
8.1, 8.0, 7.4source backportout of upstream supportSource patch (to compile)
7.0 to 7.3, 5.xnone2021 and earlierNone (migrate or isolate)

The share of the estate affected is what makes this flaw different from previous ones. Still per W3Techs, 27% of PHP sites still run on a 7 branch and nearly 8% on a 5 branch. Among internet-facing servers, the surveys published in the aftermath count several million hosts advertising their PHP version, of which a good half sit on a branch that does not receive a complete upstream release. These figures count banners, not organisations, and one shared server hides hundreds: they give an order of magnitude, not a count. It says enough that for half of the exposed PHP, "update" is not a single command.

Checking your exposure without breaking anything

You do not "test" php2shell by sending a payload: reproducing the flaw means, at best, crashing a production process, at worst running code of unknown origin. And now that the fix is out, the real question is no longer "am I vulnerable" but "am I done updating, everywhere". Verification is done by checking the version and configuration, and it takes three steps.

1. Know which PHP version actually answers over HTTP

The classic trap: on Debian and Ubuntu, php -v on the command line may answer for a different install from the one serving your pages. Query the binary that actually runs:

php-fpm -v                 # or php-fpm8.3 -v, php83-php-fpm -v depending on the distribution
apachectl -M | grep php    # is mod_php loaded?
dpkg -l 'php*' | grep '^ii'    # Debian / Ubuntu: exact package revision
rpm -qa 'php*'                 # RHEL / Alma / Rocky

If you do not control the server (shared hosting), a temporary file containing <?php phpinfo(); gives the web SAPI's version and configuration. Delete it as soon as you have read it: a forgotten phpinfo() is an information leak in itself. And look at your response headers: an X-Powered-By: PHP/8.1.2 in the HTTP response is exactly what attackers will use to sort their targets. Silencing it (expose_php = Off) fixes nothing, but takes you out of the first wave of scans.

From the outside, a single header read without sending anything else is enough to place the version. That is exactly what our domain analysis and the php2shell scanner do, and nothing more:

curl -sI https://example.com/ | grep -iE '^(server|x-powered-by):'
# Server: Apache/2.4.57 (Debian)
# X-Powered-By: PHP/8.1.2      ← advertised version, to place in the affected range

2. Read the state of the incriminated setting, on the web server side

php-fpm -i | grep -E 'session.upload_progress.enabled|file_uploads|session.upload_progress.name'

On mod_php, read these values in the phpinfo() mentioned above: the command line often loads a different php.ini from Apache's. On everywhere is the default configuration, and therefore the most likely state.

3. List what, on your side, speaks PHP

This is the most rewarding step, and the most often forgotten. Not just "the site": the staging subdomains, the old blog, the phpMyAdmin behind an obscure path, the supplier extranet, the storage array console, the camera interface. Anything answering with a PHP header or a PHPSESSID cookie is in scope. External surface inventory tools do it in one pass; by hand, it is a grep through your DNS zones and a visit to each host.

A word on the "detection" tools that appeared since 20 October. Some public scanners measure whether a server is reachable via the suspected path by sending it edge-case multipart requests and counting the PHP-FPM processes that die. Run against production, they send abnormal traffic, can bring down a worker, and a "mitigated" result only means a 403 blocked the request upstream, not that PHP is fixed. Reading the version, on the other hand, decides without sending anything dangerous: that is what the php2shell scanner does.

What to do now: the remediation plan

In order of effectiveness, the only complete remediation being the fixed version. So that is where we start.

First: update, everywhere

  1. Apply the fixed version on every host serving PHP: 8.5.12, 8.4.27, 8.3.36 or 8.2.35 depending on the branch, through the channel that serves you. Distribution packages (official repository, Ondřej Surý's PPA, Remi's repository), the official php Docker image or a derivative, hosting panel (cPanel and EasyApache, Plesk, CloudLinux and its alt-php), or managed host. Each has its own build delay after the upstream release: a few hours for the fastest, sometimes days. For 7.4, 8.0 and 8.1, it is the source backport to compile, or your distribution's package where it exists (Ubuntu 22.04 published it the same day for 8.1). On French shared hosting, ask your host for the version serving you, not a promise: OVHcloud patched its shared hosting the same day but extended its maintenance window, o2switch relies on CloudLinux.
  2. Restart all workers after the update. PHP-FPM, Apache, but also persistent processes (Octane, queues, custom workers): as long as an old worker runs, it keeps the vulnerable code in memory. A mere reload is not enough.
  3. Verify the version per SAPI, not just on the command line, and check an entire estate rather than a witness host. This is where the scanner and surface inventory help: spotting the forgotten host left behind.
  4. Take a snapshot (backup, VM snapshot) of exposed hosts before touching anything. If a compromise happened between the leak and the update, that is the reference state for the investigation.

If you cannot patch right away: the official mitigations

  • Reject multipart requests where they have no business. This is the most solid measure in the meantime, because it acts before PHP, at the web server or reverse proxy level: a multipart/form-data POST on a URL that does not accept files has no reason to exist. The obvious trade-off: you break file uploads on blocked routes. List the ones that need it and block only the rest.
  • The providers' web application firewall rules. Cloudflare pushed several emergency rules on 21 October, free included, in blocking mode. If you are behind a web application firewall, check they are active. But keep in mind that application protection comes after the point of impact, that it filters known traffic (Cloudflare did see payloads mutate to bypass it), and that it is useless if the attacker reaches the server's IP directly: only accept traffic from your provider's published ranges.
  • What is useless. Blocking the PHPSESSID cookie (legitimate sessions break, the parser runs anyway). Updating WordPress, Drupal or your Composer dependencies (the flaw is in the interpreter, not the code it runs). Relying on file_uploads = Off alone. And to take a site offline, do not merely disable the web server's PHP handler: Apache and nginx then serve the source of .php files in the clear. Stop PHP-FPM and serve a static maintenance page.
  • Isolate what cannot be fixed. For branches with no fix and no backport, CERT-EU is clear: behind a VPN, an allow list, or offline. An old PHP 5.6 application exposed to the public is a problem of days, not weeks.

Concretely, to reject multipart requests outside the routes that accept a file upload, on the Apache side (.htaccess):

<If "%{REQUEST_METHOD} == 'POST' && %{CONTENT_TYPE} =~ m#multipart/form-data#i">
  Require all denied
</If>

And on the nginx side, in the location blocks without a legitimate upload:

if ($content_type ~* multipart/form-data) { return 403; }

Reserve this for paths that do not accept a file: elsewhere, you would break upload forms.

Detect and monitor

There is no php2shell-specific indicator of compromise published with the fix. Monitoring therefore stays behavioural. On the request side, Wiz describes what its own tool leaves in the logs: unusual multipart requests followed by memory_limit exceeded errors, bursts of HTTP 500 on a single URL, abnormally long or malformed PHPSESSID cookies (the signature of the memory disclosure), and unexplained worker churn. A major caveat: all this happens below the application layer, WordPress or Laravel logs will see almost none of it, it is the web server's and PHP's logs you need to read.

On the post-exploitation side, Huntress drew up the useful list: a php-fpm, php-cgi, httpd or apache2 process spawning a shell (sh, bash), an interpreter (python, perl) or a network tool (curl, wget, nc); command lines containing /dev/tcp/, mkfifo or fsockopen; reconnaissance commands (whoami, id, uname -a) run as the web server; new PHP files in the web root or in /tmp. The successful exploitations GreyNoise has logged on its honeypots since 28 October look exactly like this: apache2 spawns sh, which runs curl to the attacker's address, and in one case a reverse shell followed by a script dropped in /tmp. Here is a Sigma rule ready to adapt to your collection, which raises an alert as soon as a web worker spawns a shell, an interpreter or a network tool:

title: 'php2shell: a web worker spawns a shell (post-exploitation)'
id: ad128690-c6ec-4e88-b40d-f50566431248
status: experimental
description: >-
  A web server process (php-fpm, apache2, httpd, php-cgi) launching a shell,
  an interpreter or a network tool is a strong post-exploitation signal for
  CVE-2026-109618 / CVE-2026-109619 (php2shell). Correlate with a rise in 500s
  and PHP-FPM segfaults on multipart POSTs.
logsource:
  category: process_creation
  product: linux
detection:
  parent_web:
    ParentImage|endswith:
      - '/php-fpm'
      - '/php-cgi'
      - '/apache2'
      - '/httpd'
  child_suspect:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/python'
      - '/python3'
      - '/perl'
      - '/curl'
      - '/wget'
      - '/nc'
      - '/ncat'
  condition: parent_web and child_suspect
falsepositives:
  - Legitimate admin scripts triggered by the application (rare in production)
level: high
tags:
  - attack.execution
  - attack.t1059

On a Windows estate (IIS + PHP), the same logic targets w3wp.exe or php-cgi.exe as the parent. Since this rule only covers the "after the shell" step, keep the flaw-specific signal in parallel: a rise in PHP-FPM worker crashes (segfaults in the FPM log) correlated with multipart POSTs is exactly the trace an unreliable exploit leaves behind.

After the fix: verify the version per SAPI, and if a host was exposed without a stopgap between 20 October and its update, search. Recent files in the web root, cron jobs, created accounts, added SSH keys. And rotate the secrets reachable from the server: if an attacker got through, that is what they took.

The lesson: what runs before your code escapes your protections

php2shell, whatever its exact mechanics, is a reminder of something application teams easily forget. A whole software layer runs before the first line of your code: the web server, the SAPI, the interpreter's request parsers.

Your access controls, your validations, your web application firewall written into the framework never see a request that crashed PHP before them. The only defence at that level is the version. And the only way to hold it is to know, at all times, what runs where.

It is also a reminder about the debt of end-of-life versions. An out-of-support branch costs nothing as long as nothing happens. The day a flaw in the interpreter comes out, it becomes an asset you can neither fix nor leave online, and the migration postponed for two years must happen over a weekend. A third of the PHP web was in that situation that morning.

And a flaw like this one shows up neither in an application scan nor in an annual pentest dated from the spring. It shows up when you map your entire information system, when you inventory your external attack surface down to the last subdomain answering in PHP 5.6, and when you know how to prioritise: a 9.2 on an interpreter present everywhere comes before everything else that week. The lesson echoes that of wp2shell and of CVE-2026-87902 this summer: the window between disclosure and exploitation is measured in hours, and you only hold it if the inventory existed beforehand.

Detecting this kind of exposure continuously with Flawfence

At Flawfence, the principle does not change from one flaw to the next. The engine maps your internet-exposed perimeter, identifies the services answering in your name, places their versions in the known vulnerable ranges and checks the exposure of the relevant vectors, without ever sending a destructive payload.

For php2shell, let us be precise. We do not run the exploit, and we do not claim to "confirm" a memory corruption remotely: that would be dishonest, and dangerous for your servers.

What the engine does is the other half of the problem, the half that decides everything now that the fix is out: the list of your hosts answering in PHP. With the advertised version, the flagging of those below the fixed version or end of life, and the admin interfaces, staging environments and forgotten subdomains that speak PHP without anyone remembering.

And for a specific server, the php2shell scanner does the same reading in one go. You enter a domain, tick the attestation, and there it is:

The console of Flawfence's php2shell scanner: a field to enter your domain, an ownership attestation checkbox, and the "Start scan" button. The tool reads the PHP version advertised by the server and places it in the affected range, without sending a payload.

It places the advertised PHP version against the 21 October fixes (8.2.35, 8.3.36, 8.4.27, 8.5.12), says whether the branch received an upstream release or a mere backport, and sends the host nothing but an ordinary request. The check is already aligned with the official versions, as we did for every WordPress flaw this summer.

Frequently asked questions about php2shell (CVE-2026-109618 and CVE-2026-109619)

What is php2shell, in one sentence?

The name given to two critical remote code execution vulnerabilities in PHP core, CVE-2026-109618 and CVE-2026-109619, rated 9.2 on CVSS v4.0, whose existence leaked on 20 October 2026 and whose fix was published on 21 October at 14

UTC. They are two memory-handling bugs in request processing: a corruption tied to out-of-memory handling, and a worker global state reused after being freed.

Which PHP versions are affected?

All versions below their branch's fix: 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Branches 7.4, 8.0 and 8.1 are also affected and receive an official source backport. For even older branches (5.x, 7.0 to 7.3), there is neither an upstream release nor a backport: you must migrate or isolate. The leak's "since 5.4.0" claim was not taken up as such by the advisory.

Should I wait for an 8.5.13 before updating?

No. Apply 8.5.12 (or your branch's fixed version) right away: it certainly closes both security flaws. The upcoming 8.5.13 will not fix php2shell, already settled, but a regression introduced by the fix, which can crash applications handling XML. It is not a flaw. As of 9 November, only the release candidates (RC1) are out, not for production. If a critical service is affected by that regression, the workaround is to stay temporarily on 8.4.26 or 8.3.36 until the next release.

How do I find out which PHP version I am running?

Not with php -v alone: on Debian and Ubuntu, that command often answers for a different install from the one serving your pages. Query the web server's binary: php-fpm -v (or php-fpm8.3 -v depending on the branch), apachectl -M | grep php to see whether mod_php is loaded, and dpkg -l 'php*' | grep '^ii' (Debian / Ubuntu) or rpm -qa 'php*' (RHEL, Alma, Rocky) to read the EXACT package revision, the one that says whether the fix is backported. On shared hosting, with no shell access, a temporary file containing <?php phpinfo(); gives the web SAPI's version, to delete as soon as read. And from the outside, a curl -sI https://your-domain/ | grep -i x-powered-by reads the version the server advertises, when it is not hidden: that is exactly what the php2shell scanner does, without sending anything else.

Is my WordPress site vulnerable?

If it runs on an unpatched PHP, yes, and no WordPress plugin or setting changes that: the flaw runs before WordPress. Updating WordPress does not protect you, and WordPress.org confirmed that no CMS update is required, the fix being on the PHP side. What counts is the PHP version serving you, so your host's work if you are on shared hosting.

Is the flaw being exploited in the wild?

Yes, according to CISA, which added both CVEs to its catalogue of actively exploited vulnerabilities (KEV) on 26 October. Attempts have been massive from the start: Cloudflare went from a few thousand to "millions", with payloads modified to bypass its rules, and Wordfence blocked more than 74,000 requests on its WordPress estate; Amazon Threat Intelligence even says it saw an attempt as early as 17 October, before disclosure. And the first successful intrusion is confirmed: Dream Research, verified by Unit 42, describes twenty-five Palo Alto PAN-OS firewalls and servers rooted by chaining php2shell with a kernel flaw, through their management interface exposed to the internet. On web servers, however, no mass compromise is confirmed as of 9 November. Working exploits exist: GreyNoise counts more than 1,200 successful exploitations of its honeypots since 28 October, from five addresses. Public code, for its part, remains unreliable, Intel 471 having succeeded only once in about two dozen attempts. The discoverers' exploit works against mod_php in default configuration. The conclusion does not change: reason as if exploitation could succeed, and patch without waiting.

Why were the prefecture, tax and Météo-France sites taken offline?

Because the French state chose to pull the plug rather than wait. On the afternoon of 21 October, at ANSSI's request, the Interior Ministry placed all its exposed sites into "preventive maintenance", prefectures included, Météo-France closed its forecast and weather-warning sites, and the tax authority's site also showed a maintenance page. This is not an attack: it is the measure that CERT-FR, CERT-EU and the UK NCSC recommend for any system that cannot be fixed immediately. The Netherlands and Finland had done the same in the morning. On the morning of 23 October, Météo-France and Ameli were back, but the tax authority's site, several prefectures and the family benefits agency still showed maintenance.

Who discovered php2shell?

Three teams, separately, and all with AI models: Ryan Austin at Calif (as part of OpenAI's Patch the Planet programme), OpenAI, and Wiz's research team. Calif and OpenAI reported the same root cause on 11 August 2026, Wiz further vectors on 24 August. Wiz says one researcher completed in a week what would have taken a team months. And the PHP Foundation acknowledges that the first signs dated back to the 2024 Quarkslab audit: a candidate fix existed, no concrete vector, and the matter stayed pending for lack of resources and of a process able to decide. It announced an ecosystem security team, new hires and majority rather than consensus decisions.

Is disabling session.upload_progress enough?

No. The official advisory makes it a partial mitigation of CVE-2026-109619 only (session.upload_progress.enabled=0, set administratively), because upload progress tracking is one of the paths that reuse the stale state. It touches neither the other paths of that flaw (including the fatal error backtrace on PHP 8.5) nor CVE-2026-109618. The maintainers are adamant: "ini settings won't save you", the only complete measure is updating. Keep the setting at 0 after updating all the same: an advisory of 23 October recommends it against a third vector, CVE-2026-115560, unlikely but not fixed yet, until the next release. Upload progress is also the path the attack on Palo Alto firewalls went through.

Does a web application firewall protect me?

It reduces the risk, especially if it rejects multipart requests on URLs that do not need them, because that filtering acts before PHP. The emergency rules Cloudflare pushed on 21 October go in that direction. But a web application firewall filters known traffic shapes and can be bypassed, Cloudflare did see payloads mutate against its rules; it buys time, it does not replace updating.

I am on shared hosting, what should I do?

Check the PHP version serving you (in the host's panel or via a temporary phpinfo()), choose the most recent branch it offers if you are still on 7.x or 8.0, and ask explicitly when the fixed versions will be deployed. Good hosts communicate about it; silence is an answer.

In summary

php2shell is the situation security teams dread: a flaw in a component present on two thirds of the web, disclosed by a leak before its fix, exploitable before any application code, and much of whose exposed estate cannot be fixed with a single command. The essentials are clear: two real RCEs, fixed in 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12, source-backported for 7.4, 8.0 and 8.1, Debian and Ubuntu packages the same day, massive exploitation attempts, a KEV listing by CISA on 26 October, a first confirmed intrusion on Palo Alto firewalls that embed PHP, working exploits seen against honeypots but no mass compromise of web servers, and a French state that chose to pull its sites while it fixed things. Three points to keep an eye on: the garbage collector regression that 8.5.13 will fix, the third vector CVE-2026-115560 (session.upload_progress.enabled=0 in the meantime), and devices that embed PHP, which ANSSI now points to as the real risk.

What we do now comes down to three lines: know which PHP answers where, update everywhere and restart the workers, and for what cannot be fixed right away, apply the official mitigations and isolate. The underlying reflex stays the same as for every flaw we cover: a full inventory of what your organisation exposes, and continuous monitoring of those assets' versions. That is what Flawfence does, for PHP as for the next flaw that does not yet have a number.

Check your exposure right now, it will take you only 5 minutes. And for a single server, the php2shell scanner is free.

Sources

Let’s discuss your external exposure

Request a personalized Flawfence demo and discover your real exposure level.