Back to Blog List
PHP2Shell: Critical Flaw Runs Code Without a Login
October 22, 20269 min read

PHP2Shell: Critical Flaw Runs Code Without a Login

PHP patched two critical flaws on 21 October 2026. CVE-2026-109618 and CVE-2026-109619 allow code execution on a web server without a login. On 22 October 2026, organisations were still choosing between the patch and taking sites down.

The queue was still open on 22 October

The fix landed on Wednesday 21 October, ahead of the announced 14:00 UTC slot. php.net opened the advisory the same day. Both flaws score 9.2 on CVSS v4.0. The PHP Group assigned the score.

CERT-EU said that rating signals unauthenticated remote code execution. No password. No account. The request comes in over the internet.

By 22 October, the US National Security Agency and India's CERT-In had warned organisations. Dane Knecht of Cloudflare said early attacks were already showing up, and that mitigations were moving as new paths appeared.

The score is critical. The vector marks attack complexity as high. The outcome does not change. When the path lands, code runs on the server.

What is PHP2Shell?

PHP2Shell is the public name for two core flaws closed on 21 October 2026. The official records are CVE-2026-109618 and CVE-2026-109619.

The first flaw interrupts a request when memory runs out. Cleanup can then treat half-built data as valid. The second leaves request-owned internal state alive after its memory is freed. The next request on the same worker can trust that stale state.

Neither bug sits in a plugin. Neither sits in a theme. Both sit in PHP itself. PHP says a demonstrated exploit on mod_php can fire before any application code runs.

"These vulnerabilities often provide a direct path to the server's file system or database."

— US National Security Agency, as reported by the BBC, 21 October 2026

Where does the risk sit?

Every installation that serves web requests is in scope. PHP's list is short.

• PHP-FPM is in scope.

• Apache mod_php is marked the highest risk.

• php-cgi is in scope.

• FrankenPHP is in scope.

• LiteSpeed is in scope.

A one-shot command-line script is not the centre of this story. The centre is the worker that prints a page for a visitor. If the wall is in the application and the break is in the core, the wall does not arrive in time.

Which version is safe?

The safe line is four version numbers. Anything older on those branches is not patched.

• On PHP 8.5, the first fixed release is 8.5.12.

• On PHP 8.4, the first fixed release is 8.4.27.

• On PHP 8.3, the first fixed release is 8.3.36.

• On PHP 8.2, the first fixed release is 8.2.35.

PHP 8.5.11 and earlier, 8.4.26 and earlier, 8.3.35 and earlier, and 8.2.34 and earlier are affected. PHP 8.1 and older no longer receive releases from the PHP project.

Narrow source backports exist for 7.4, 8.0 and 8.1. Without a vendor package, that branch or a move is what remains.

Security support for PHP 8.2 ends on 31 December 2026. Today's fix is the late stretch of that calendar. It does not buy comfort for the year after.

Does a WordPress update patch PHP?

No. WordPress, Drupal, Joomla and Magento sit on top of the language. Updating the core, a plugin or a theme from the admin panel does not change the PHP version.

The host, the server or the image you built changes that version. On shared hosting the selector is in the panel. If it is missing, a ticket gets opened. While the ticket waits, the site stays online on an unpatched core.

Why did sites take themselves offline?

Finland shut public government web services as a precaution. Valtori, the Government ICT Centre, tied the move to the PHP flaws.

Director General Hannu Naumanen told STT shortly after 13:00 on Wednesday that the shutdown was underway. The National Land Survey site was already in maintenance.

In the Netherlands, the cyber-security agency took its own website offline. The parliament site and the public-health institute were on the list the BBC reported.

Wikimedia took some systems down ahead of the fix. CSC wrote that it had no known exploitation in its own environment and still suspended some services.

"Where immediate remediation is not feasible, organisations should consider taking the system offline until it can be fully mitigated."

— NCSC guidance, as reported by the BBC, 21 October 2026

Edinburgh Council's website became unreachable. So did the BBC pages for Doctor Who and The Traitors. The BBC did not confirm that those last outages were caused by PHP. An unconfirmed outage does not get written as a confirmed one.

Reuters filmed the French government site info.gouv.fr showing as unavailable, from Berlin, the same day. Public sites in Europe chose between the patch and a short outage. Some chose the outage.

AI saw the flaw before attackers did

OpenAI wrote that frontier models found these flaws before attackers did. The company calls that gap a Defender's Window. Maintainers and security providers prepared fixes before disclosure.

In OpenAI's account, Calif identified a critical flaw using GPT-5.6 Sol. Wiz independently reported both flaws. The second was filed on 24 August 2026. Both efforts used models.

Wiz described the findings as among the most severe ever discovered in PHP, and argued they belong in the same conversation as the severest bugs in software history. The boast and the record sit side by side. Governments taking sites down keep the argument from staying abstract.

"Frontier models were critical to making this process practical, enabling us to develop and adapt working exploits across multiple applications in hours."

— Wiz, as reported by the BBC, 21 October 2026

Is the Defender's Window still open?

The interval described as a window became readable by everyone the moment of disclosure. Knecht said early attacks were already visible. The window is not a shield. It is a clock.

Closed work that started in August fitted into the afternoon of 21 October. That gap was for the patch. The time after disclosure is for the patch queue. A site waiting in that queue falls because of operations, not because of the speed of discovery.

A partial mitigation is not the patch

PHP wrote that an update is the only complete fix. There are steps for teams that cannot update yet. All of them are partial. None of them declares an installation safe.

• For CVE-2026-109618, the memory limit can be set to unlimited somewhere the application cannot override.

• A low post_max_size, plus request-size limits at the proxy, narrows one arm of the same flaw.

• For CVE-2026-109619, session upload progress is turned off and every worker is restarted.

• On PHP 8.5, fatal error backtraces are turned off as well. Workers restart again.

• RLIMIT_AS and RLIMIT_DATA are not recommended. PHP wrote that those limits can trigger the fragile allocation path.

The full settings are in the php.net advisory. Copying them here does not exempt anyone from the update.

Why this matters

Thickness of the wall stopped being the deciding factor. The hour of the patch did. A team could have hunted a defect like this for months. Wiz says models brought that class of work down to hours. Discovery now ends early. Scanning starts early the moment the record is public.

Finland's choice is the lesson. They accepted a known outage rather than an unknown breach. CSC wrote the same choice. An outage is not a confession of compromise. It is a confession of the queue.

This advisory is not a plugin bulletin. If the panel says PHP 8.1, 8.0 or 7.4, the official release does not cover you. Without a vendor backport, the site stands open on an unsupported core.

Is this Log4Shell again?

A similar name is not the same defect. Log4Shell lived in a Java library. PHP2Shell lives in the language that prints the page. The only shared result is this. When the patch is late, the risk grows as a fleet, not as a single site.

The next breach line will probably not carry a new brand name. It will carry an old image, an old host, and the sentence "WordPress is up to date." PHP2Shell breaks that sentence.

What happens next

Hosts will queue the supported branches. In its 21 October bulletin, AWS wrote that its own services were not affected. It pointed customers running affected PHP in their own environments at the update.

An Elastic Beanstalk platform release shipped the same day. The move to PHP 8.3.36 was targeted for 22 October.

If early attacks are already visible, scanning does not wait on a published critical flaw. Public sites that went dark will come back. Some will come back patched. Some will come back merely switched on. Those are not the same story.

An organisation still running PHP 8.1 or older writes a decision this week. Move, confirm a backport, or take the site down. Watching is no longer a neutral third option.

Is your version on this list?

The safe versions are 8.2.35, 8.3.36, 8.4.27 and 8.5.12. If the server is not serving one of those, the patch is not finished. Leave the version in the comments. Send this piece to the person who holds the panel password.

Sources

PHP security advisory, 21 October 2026. https://www.php.net/archive/2026.php#2026-10-21-5

NVD, CVE-2026-109618, published 21 October 2026. https://nvd.nist.gov/vuln/detail/CVE-2026-109618

NVD, CVE-2026-109619, published 21 October 2026. https://nvd.nist.gov/vuln/detail/CVE-2026-109619

GitHub advisory GHSA-w8hw-w9fx-j79w. https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w

GitHub advisory GHSA-6wmf-4rv5-p3rp. https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp

BBC News, Tom Gerken, Laura Cress and Joe Tidy, 21 October 2026. https://www.bbc.com/news/articles/cmly0lg3w5x2o

Yle News, Finland shutting public sites, 21 October 2026. https://yle.fi/a/74-20252600

Reuters, "What is PHP and why did it take government websites offline?", 21 October 2026. https://www.reuters.com/technology/what-is-php-why-did-it-take-government-websites-offline-2026-10-21/

OpenAI, coordinated disclosure, 21 October 2026. https://openai.com/index/coordinated-disclosure-of-critical-vulnerabilities/

AWS Security Bulletin AWS-2026-143, 21 October 2026. https://aws.amazon.com/security/security-bulletins/2026-143-aws/

JFrog Security Research, PHP2Shell note, 21 October 2026. https://research.jfrog.com/post/php2shell-all-you-need-to-know-about-cve-2026-109618-and-cve-2026-109619/

CSC, precautionary shutdown, 21 October 2026. https://csc.fi/en/news/some-csc-services-temporarily-taken-offline-as-a-precaution-due-to-php-vulnerabilities/

The Neuron, Marianne Sison, 22 October 2026. https://www.theneuron.ai/digest/everything-that-happened-in-ai-today-thursday-october-22-2026/