Skip to content
← Back to YouBlog

Published article

What is PHP2Shell and are you still exposed?

Drafted with AI from the video "php2shell: the PHP flaws that leaked before the fix", then reviewed and published by Gustavo Miranda.

PHP2Shell refers to two critical, unauthenticated remote code execution flaws in the PHP runtime that were fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Details escaped two days before the release, exploit traffic scaled into the millions within hours, and the only real remedy is updating to a patched build.

What are the PHP2Shell PHP vulnerabilities?

PHP2Shell is the name given to two critical, unauthenticated remote code execution flaws in the PHP runtime, both rated 9.2 under CVSS v4.0. Patched builds released on October 21, 2026 were PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, according to Acer Corner's explainer.

The flaws matter because of where they sit. PHP is a server-side language and runtime that generates pages before a request reaches application code, so a memory-handling bug inside it can be triggered without touching WordPress, Laravel or a custom framework. PHP's own advisory describes both bugs as reachable without authentication and as leading to code execution on the host.

The identifiers circulating in press coverage are CVE-2026-109618 and CVE-2026-109619. Treat those numbers as secondary detail, not as the thing to act on. The version number of your PHP build is the only fact that changes your exposure.

A short naming note: the flaw details were never meant to be public when they appeared. PHP had scheduled a coordinated release, and the disclosure schedule slipped before the release date arrived.

How the two PHP2Shell bugs work

Both bugs are memory lifecycle errors inside per-request data handling, and both can end with an attacker executing code on the server. Neither requires a login, a valid session or a privileged endpoint.

The first flaw involves request shutdown during memory exhaustion. When PHP runs out of memory mid-request, it discards the in-progress visit. If the request's bookkeeping was only partly initialized at that moment, later cleanup steps treat the half-built structure as complete and act on fields an attacker influenced. PHP's advisory states this path can conclude with attacker-controlled code execution.

The second involves stale data surviving between requests. A single PHP worker handles many visits in sequence, and some values from one visit can outlive the memory that held them. The next request can then consume those leftovers before they are cleared, which gives an attacker a way to seed state for a later request.

Neither bug needs application cooperation. On Apache with mod_php, PHP demonstrated a working exploit in which one request from an anonymous visitor fires before the site's own code runs at all. Careful application code does not compensate for a runtime that has already been compromised.

How the PHP2Shell details leaked before the fix

The embargo broke roughly two days before the scheduled release, when vulnerability details circulated on social media instead of through the coordinated channel. PHP moved to an emergency release on October 21, 2026 rather than hold the original date.

A security firm publicly confirmed the flaws were genuine the same evening the details appeared, which removed any remaining doubt for operators deciding whether to act. PHP then published fixes for every branch it still supports, from PHP 8.2 upward.

Branches from PHP 7.4 to 8.1 received only minimal source-level patches, because PHP no longer ships normal updates for them. PHP 8.1 and anything older have reached end of life for security support, and PHP's guidance is to upgrade rather than backport.

Who was exposed and how fast attacks scaled

Every configuration that serves web pages with an affected PHP build was exposed, including PHP-FPM, FrankenPHP and LiteSpeed. PHP explicitly warned that no setting fully protects an unpatched install, which removes the usual fallback of hiding behind configuration.

Exploit volume moved at the speed of a social feed. Cloudflare chief executive Matthew Prince reported thousands of exploit attempts in the 10 hours before announcement, tens of thousands within 45 minutes of it, hundreds of thousands within two hours, and millions shortly after, as The Next Web reported on October 22, 2026.

Amazon's threat intelligence team traced an exploitation attempt back to October 17, 2026, four days before public disclosure, according to TechRadar's coverage. That suggests someone had prior knowledge. Amazon also reported limited success among the attackers it observed.

Attempt volume is not the same as confirmed compromise. Many sites went offline as a precaution while their operators patched, and an unreachable site is not evidence of a breach. Only server logs and file integrity checks can answer that question for a specific host.

Which PHP versions are fixed

Patched PHP builds for PHP2Shell are 8.5.12, 8.4.27, 8.3.36 and 8.2.35. If your server reports any earlier patch level within those branches, it is still vulnerable.

Checking is one command. Run php -v on the host, read the version, and compare it against that list. On managed hosting or a WordPress site you do not control the runtime, so the check becomes a support ticket to your provider.

The upgrade path depends on where you sit:

How this compares to other runtime vulnerability responses

PHP2Shell is best understood by comparing it with other runtime-level incidents rather than treating it as unique. The pattern is a pre-authentication bug inside the language runtime, patched across several maintained branches at once, with exploit traffic following disclosure within hours.

The practical difference from an application-level plugin bug is reach. A flaw in the PHP runtime sits beneath every framework, CMS and custom script on the same host, so a single unpatched pool exposes all of them.

What to do if you run PHP

Patch first and investigate second. PHP states that updating is the only safe choice and that no configuration setting fully protects an unpatched install, so hardening, WAF rules and file permission changes are stopgaps, not substitutes.

For teams running infrastructure alongside Brazilian developer tooling, the workflow around deploys matters as much as the patch itself. Stack choices like CrazyStack affect how quickly a runtime update can be rolled out across environments, which is the difference between a same-day fix and a week of manual work.

After patching, confirm the running version rather than the installed package. Restart PHP-FPM or the web server so that worker processes pick up the new binary, then re-run php -v from the same context your site uses.

The PHP2Shell vulnerability database problem

A separate analysis argues the deeper failure was in how vulnerability records match installed software, not in PHP's disclosure handling. The GVIP project's writeup published on November 9, 2026 contends that an accurate advisory still failed to reach most of the PHP actually running in production.

That framing matters for anyone operating a scanner. A clean scan result depends on the scanner knowing which PHP build is installed, which is often not what a network probe can see. The PHP project wrote a precise record, and matching it to real hosts remained the weak point.

Treat scanner output as a starting hypothesis. The authoritative check stays the same: the version string on the host, read directly.

FAQ

  • What is PHP2Shell? PHP2Shell is the name for two critical PHP runtime vulnerabilities rated 9.2 under CVSS v4.0, fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on October 21, 2026. Both allow unauthenticated remote code execution.
  • Is PHP2Shell being actively exploited? Yes. Cloudflare reported millions of exploit attempts within hours of disclosure, and Amazon Threat Intelligence traced an attempt to October 17, 2026, four days before public disclosure.
  • Does a firewall or WAF rule protect me from PHP2Shell? PHP states that no setting fully protects an unpatched install. A WAF can reduce noise but does not replace updating the runtime.
  • Am I affected if I run PHP 8.1 or older? Yes, and you will not receive a normal update. PHP 8.1 and earlier are past end of life, so you need to migrate to a supported branch or get a fixed package from your Linux vendor.
  • How do I check my PHP version? Run php -v on the host and compare the output against 8.5.12, 8.4.27, 8.3.36 and 8.2.35. After upgrading, restart PHP-FPM and check again so you confirm the running build.

Turning a three-minute security brief into written content

Security stories like this one compress violence into a short timeframe: details leak on one day, fixes land the next, and exploit traffic scales while most operators are asleep. Video is a natural home for that kind of narrative because the timeline is easier to follow when someone narrates it. Written coverage has a different job, because readers scan for the version numbers and the patch commands.

If you already explain this material in a video, the transcript is the raw material for an article that can carry the version list, the CVE identifiers and the patch procedure in a form readers can check against their own servers. YouBlog takes a YouTube URL, transcribes the video and generates a draft you can review and correct before you publish.

Tools in the Brazilian developer community, from the CrazyStack TypeScript stack to creators like Dev doido, spend hours producing technical explanations that stay trapped in one format. A transcript-to-article flow lets the same explanation reach readers who need a written reference they can search and cite. The version numbers still need your review, since video transcripts routinely misspell identifiers.

A note on scope before you publish: confirm every CVE number, patch level and product name against an authoritative advisory, then treat the generated draft as a starting point. Accuracy decides whether a security article is useful or harmful.

YouBlog

Source video

YouTube thumbnail: php2shell: the PHP flaws that leaked before the fix

Source video

php2shell: the PHP flaws that leaked before the fix

Create from this video

This article was created automatically from a new video.

Automate my channel

Turn your YouTube videos into articles

Built for creators with a backlog and no editor on staff. This page started as a video. YouBlog drafts from the transcript, you review every word, then publish on a first-party /p/{slug} page. Nothing goes live until you publish it.

Turn your videos into articles

Published with YouBlog