PHP2Shell: Which PHP Versions Fix It, Who Is Exploiting It, and What a Slow Patch Exposes

PC Drama
23 views

Tuesday, October 20, 2026, 3:20 p.m. UTC marks the day where two PHP vulnerability IDs are rated above 9. A Hacker News thread reported these a full day before anyone was supposed to see these vulnerabilities.

Seventeen hours later the first exploit attempt reaches the sensors of the Delft Threat Intelligence Lab, and by the time PHP ships its patched releases at 2 p.m. UTC on Wednesday, someone has already typed shell commands into a Delft honeypot. A shared host that took two more days to install those releases would have left every site on its servers exposed through the busiest hours of the attacks.

The suspects are two memory bugs inside PHP itself, booked together as PHP2Shell: CVE-2026-109618 and CVE-2026-109619. Neither one needs a login, a plugin or a careless line of application code, and the evidence against each starts with how it breaks.

CVE-2026-109618CVE-2026-109619
Advisory titleRCE via OOM corruptionRCE via stale global state
What breaksAn out-of-memory error interrupts PHP while request data is half built, and cleanup trusts the leftoversState owned by one request outlives its freed memory, and a later request reads it
Reached throughOversized or malformed multipart uploadsSession upload progress handling and early INI diagnostics
SeverityCVSS v4.0 9.2CVSS v4.0 9.2
Login neededNoNo
Fixed inPHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released October 21, 2026
Main stopgapAn administrative memory_limit=-1 and a low post_max_sizesession.upload_progress.enabled=0, then restart every worker
A 1U rack-mount web server pulled halfway out on its rails in a dim server aisle, its drive bays and status lights lit in cyan
The version that counts is the one this box hands to web requests, which is not always the one your shell finds first.

Both CVEs are fixed in the same four releases, published together at 2 p.m. UTC on October 21, 2026. The php.net advisory lists every PHP installation serving web requests as affected, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, and rates mod_php highest because an unauthenticated request can start the attack before any application code runs.

PHP branchFirst fixed releaseStatus
8.58.5.12Supported
8.48.4.27Supported
8.38.3.36Supported
8.28.2.35End of life on December 31, 2026
8.1 and olderNoneMinimal source backports for 7.4, 8.0 and 8.1 only

Ask the build that serves web traffic, because a hosting server can carry many PHP builds side by side and the one your shell finds first may not be the one handing pages to visitors. The PHP selector in your hosting panel names the web build; on the command line, check the version and the upload progress setting the build reads.

php -v
php -i | grep session.upload_progress.enabled
Macro view of a small network switch on a perforated metal wall bracket, its port lights glowing amber with one ethernet cable plugged in
Delft's sensors include a network telescope, a honeypot fleet and one high-interaction honeypot that ran real PHP.

The Delft Threat Intelligence Lab at TU Delft logged 35,076 PHP2Shell requests from 502 source IPs, spread over 232 networks in 60 countries, between 8:37 a.m. UTC on October 21 and 12:25 a.m. UTC on October 25. A third of those addresses (165) sent code or a downloader, and the busiest hour, 9 p.m. UTC on October 21, carried 2,116 requests from nine machines.

"We do not know whether these exploits are effective, or in which cases they will or will not work."

Harm Griffioen, Zohar Cochavi and Murtuza Ali, Delft Threat Intelligence Lab, Delft University of Technology, in PHP2Shell in the Wild

Their PHP error logs show how far the attempts got. Seventeen IPs drove PHP into the out-of-memory errors that leave a dangling pointer behind, and two of them reached the second step, where a worker reads that stale state. The droppers pointed at second stages, including a Mirai-derived DDoS bot, and 888 requests from 104 IPs carried session deserialization gadgets, among them chains built from Laravel, Monolog, Guzzle and Symfony classes that ship inside ordinary Composer projects.

PHP2Shell techniques seen by Delft sensors, October 21 to 25, 2026
TechniqueRequestsSource IPs
Probe only (upload progress field, nothing else)20,048394
PHP code in the progress field10,38534
OS command9,93757
wget or curl dropper4,61749
Use-after-free with forged zval structs1,80710
Session deserialization gadget888104
Out of memory: hundreds of multipart parts56961
PHP code in the uploaded filename50330
Out of memory: header-line flood4848
Out of memory: deeply nested field names32036
Out of memory: empty file fields30627
Body of 1 MB or more5517

One request can use several techniques, so the rows add up to more than 35,076. Counts as published on the Delft dashboard at 12:25 a.m. UTC on October 25, 2026.

What a Two-Day Patch Gap Would Expose

Link to section: What a Two-Day Patch Gap Would Expose
Top-down view of a mechanical stopwatch resting on a stack of folded dot-matrix printer paper on a dark desk, lit by a violet glow
A shared host hands out no patch receipt, so a file timestamp is the closest thing you get to one.

Picture a shared host that installs the patched PHP build almost two days after PHP published the fix. Measured against Delft's data, that gap would cover the busiest hours of exploit traffic, including the 2,116-request peak at 9 p.m. UTC on October 21, and every site on the server would sit out the same window together, because one PHP build serves them all.

A careful host would also switch session upload progress off server-wide, the stopgap php.net recommends keeping even after patching, and restart every worker so the setting takes hold. Two commands tell you where your own server stands: when its PHP binary last changed, and whether any of Delft's senders appear in your logs.

stat -c '%z %n' "$(command -v php)"
awk 'NR==FNR{a[$1];next} ($1 in a)' delft-ips.txt access_log | wc -l

Method: we ran the second command on October 24, 2026, matching the 499 IPv4 sender addresses in Delft's published table against our site's access logs from September 30 to October 25, 2026. Request bodies are not logged, so a PHP2Shell payload cannot be seen directly.

It found a few lines from Delft's senders, all weeks before the leak and none carrying exploit traffic. After the leak none of them reached our site, and no request line or user agent in our logs named a PHP2Shell tool.

For a business on shared hosting, this is what we learned: your host decides when the patch is installed, so ask yours for the install time in writing and compare it with PHP's October 21 release.

Mitigations If You Cannot Patch Today

Link to section: Mitigations If You Cannot Patch Today
Close-up of an open breaker panel in a small server closet with one black circuit breaker switched off and a green light in the background
Switching off session upload progress is the closest thing PHP2Shell has to a breaker, and it still needs a worker restart.

php.net calls updating the only complete fix. Its interim settings buy time when a host or a frozen server makes that impossible today, and each one needs every worker restarted, because ini_set() and an FPM .user.ini apply too late to help. A follow-up informational advisory on October 23 recommends keeping upload progress off until the next bugfix release, to cover a third, less likely route tracked as CVE-2026-115560.

PHP2Shell interim mitigations from the php.net advisory
SettingCountersNote
session.upload_progress.enabled = 0 in php.ini, the FPM pool or server configCVE-2026-109619Also recommended for CVE-2026-115560
fatal_error_backtraces = 0CVE-2026-109619PHP 8.5 only
memory_limit = -1, set administrativelyCVE-2026-109618No pool, directory or app setting may restore a finite limit
post_max_size of 8M without uploads, 32M with themCVE-2026-109618Keep upload_max_filesize below it
Proxy limits on size, field count, parts, headers and nestingCVE-2026-109618Including requests without a usable Content-Length
Container or cgroup memory limit per workerCVE-2026-109618Never RLIMIT_AS or RLIMIT_DATA

PHP 8.1 and older get no official release, only minimal source backports, so a site stuck on one of those branches faces a rebuild decision more than a patch decision. Our secure or replace check walks through that choice, the WordPress rebuild comparison covers what moving costs, and the threat data page tracks what reaches small business sites every week.

What is PHP2Shell?

PHP2Shell is the name for two critical PHP remote code execution flaws, CVE-2026-109618 and CVE-2026-109619, fixed on October 21, 2026. Both let an unauthenticated request corrupt memory inside PHP itself, so no plugin or application bug is needed to exploit them.

Which PHP version fixes PHP2Shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix both flaws. PHP 8.1 and older receive no official release from the PHP project, only minimal source backports for 7.4, 8.0 and 8.1.

Is PHP2Shell being exploited?

Exploit attempts are widespread. The Delft Threat Intelligence Lab logged 35,076 requests from 502 IPs in four days, says it cannot tell which ones succeed, and saw two IPs reach the second stage of the exploit inside its honeypot's PHP logs.

Does turning off session.upload_progress fix PHP2Shell?

No. Setting session.upload_progress.enabled=0 removes one route to CVE-2026-109619 and php.net recommends it, but updating PHP is the only complete fix, and the setting does nothing for the out-of-memory bug in CVE-2026-109618.

Are Laravel sites affected by PHP2Shell?

Any Laravel site on an unpatched PHP is exposed, because the bugs sit in PHP's request handling before the framework starts. Delft's sensors also caught gadget chains built from Laravel classes, aimed at turning a stale session into code execution.

PHP is maintained by the PHP Group, whose security team published both advisories. The live exploitation dashboard is run by the Delft Threat Intelligence Lab at Delft University of Technology and refreshes every five minutes.

Sources: php.net, advance notice of the security release; php.net, critical remote code execution vulnerabilities advisory; php.net, informational advisory on session upload progress; Delft Threat Intelligence Lab, PHP2Shell in the Wild.

Related Articles