Cybersecurity

PHP2Shell: Which PHP Versions Need Security Patches?

Two confirmed PHP flaws can expose web servers to remote code execution. Here are the fixed versions, patch checks and limits of temporary workarounds.

Posted by the Qlauson TeamPublished Last updated — views9 min read
Share story
Original conceptual still life of a cracked glass server protected by a silver shield with coral rivets; not an actual vulnerable server or product photograph.
Conceptual editorial illustration / Cybersecurity. Not a product screenshot.

The short answer

PHP2Shell refers to CVE-2026-109618 and CVE-2026-109619 in PHP’s core runtime. PHP released fixes on October 21: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Updating the running web runtime—not merely the command-line copy—is the priority.

Two confirmed PHP flaws can expose web servers to remote code execution. Here are the fixed versions, patch checks and limits of temporary workarounds.

01 / The story

What is PHP2Shell?

PHP2Shell is a public nickname for two confirmed flaws in the PHP runtime: CVE-2026-109618 and CVE-2026-109619. A CVE is a tracking identifier for a disclosed vulnerability. The name is used in security reporting; PHP’s own advisory describes the individual memory-handling bugs. This is not an invented label for a generic PHP coding mistake. [1] [3]

On October 21, 2026, PHP published an emergency security advisory and four fixed releases. Its team says the flaws can allow unauthenticated remote code execution. In plain English, a request arriving at a vulnerable server can potentially cause it to run attacker-controlled instructions without the attacker first signing into the application. Exploitability still depends on configuration and the request-processing path. [1]

For a site owner, the immediate question is not which marketing name is trending. It is which PHP build actually handles web requests, whether that build contains both fixes, and whether every worker has been replaced after the update.

02 / The story

What the two bugs do at a high level

CVE-2026-109618 concerns out-of-memory handling. A failure can interrupt initialization of internal request data. Cleanup can then mistake partially initialized data for valid data. CVE-2026-109619 concerns stale global state: internal data can survive after the memory backing it is freed, and a later request handled by the same worker can use that stale state. [1]

These are runtime memory-safety problems, not proof that every application has an SQL injection bug or that every upload contains malware. They can sit below normal application logic. That is why changing a WordPress theme or adding an application-level validation rule is not a replacement for the PHP fix.

Google Cloud’s response describes potential remote code execution and memory disclosure and reports a critical severity score of 9.2 for each flaw. A severity score communicates risk under a scoring model; it does not prove that your server was attacked or reveal a probability of compromise. We do not reproduce exploit payloads or procedures here. [2]

03 / The story

Which versions contain the fixes?

The PHP project identifies the following fixed releases. Use the matching supported branch or a later vendor release explicitly containing both fixes. A Linux distribution may backport patches while retaining an older-looking upstream version number; confirm the distribution advisory and package revision, not only the first version string. [1]

PHP’s advisory includes web-serving installations such as PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed. It identifies mod_php as the highest-risk case, with a demonstration that can trigger before application code runs. Do not infer that a different serving method is safe simply because the most visible demonstration used Apache. [1]

PHP branchFirst fixed release in the advisoryWhat to verify
8.58.5.12Both CVEs fixed; replace running workers
8.48.4.27Both CVEs fixed; inspect the web runtime
8.38.3.36Both CVEs fixed; verify vendor packages
8.28.2.35Both CVEs fixed; plan supported-branch migration

04 / The story

What about PHP 8.1 and older?

PHP says 8.1 and older no longer receive normal PHP-project updates. Some distributions or long-term-support vendors may provide backported fixes. The advisory also links minimal source backports for 7.4, 8.0 and 8.1, aimed at source builders and users without an LTS vendor. Those special patches do not restore normal upstream support. [1]

Ask a managed host for a written patch statement covering both CVEs and the runtime serving your site. “We updated PHP” is less useful than an exact package/build, advisory reference and rollout status. If you maintain an old branch yourself, weigh a supported-version migration alongside immediate containment.

Updating a base container image is not enough when running instances still use the old image. The same problem applies to an updated package with old long-lived workers. Treat replacement and verification of the running service as part of patching, not an optional final step.

05 / The story

Has exploitation been confirmed?

Singapore’s Cyber Security Agency reports widespread exploitation attempts and available proofs of concept in its October 21 alert, updated October 22. We attribute that report rather than treat it as proof that every targeted website was compromised. Attempts and successful intrusions are different evidence. [3]

PHP’s advisory establishes a demonstrated exploitation path and urges immediate updates. Qlauson has not verified an incident affecting a named production organization, measured the global attack rate or inspected a compromised host. Lack of a confirmed incident in this article is not evidence that an exposed server is safe. [1]

If logs, integrity checks or alerts suggest compromise, use your incident-response process. Preserve relevant evidence, involve your security team or host, and consider credential rotation through trusted channels. Patching closes the known flaw; it does not automatically remove an intrusion that already occurred.

06 / The story

How administrators can check patch coverage safely

Build an inventory of PHP deployments: websites, API services, background administration panels, containers and hosted environments. Identify the runtime actually serving each application. A command-line PHP version may differ from the web server’s PHP pool, and different pools can run different builds.

Use trusted local administration tools and your host’s management information. Do not leave a public phpinfo page online to expose paths, settings and software details. Ask the vendor whether its installed package addresses both identifiers, then restart or replace workers using the vendor’s instructions. [1]

After rollout, run normal application checks—login, uploads if used, API requests and background jobs—and confirm that the running process or container uses the patched build. Record who checked each service and when. For larger environments, package inventory and deployment records are safer than ad hoc exploit tests against live systems.

07 / The story

Why temporary mitigations are not a complete fix

PHP explicitly says only an update is a complete solution. Its interim measures reduce particular attack paths without making a vulnerable installation safe. Settings must apply at the correct initialization stage and sometimes require every worker to restart. Copying a setting into application code may act too late. [1]

We link the original advisory rather than present a universal configuration recipe. Some memory-related changes have availability consequences, and individual mitigations do not block every variant. Administrators should apply them only with the advisory, their platform guidance and a clear patch plan.

A web application firewall can be an additional defensive layer, not a substitute for repairing the runtime. Google Cloud provides platform-specific guidance for its customers; those instructions do not automatically describe another hosting provider’s product or protections. [2]

08 / The story

What does AI have to do with these vulnerabilities?

Google states that Wiz Research used a mix of AI models to help identify and remediate the flaws, and attributes a contribution to Gemini 4 Argon. That is an account from participants, not a controlled study proving that one model alone discovered, reproduced and repaired every issue. [2]

The vulnerability exists in PHP’s runtime; it does not require a website to run an AI agent. “AI-assisted discovery” and “an AI vulnerability” are different claims. If you operate PHP without any AI features, the patch question still applies.

For the separate risks of giving AI access to files or browser sessions, read our computer-use agent security guide. Keeping those subjects separate makes both security stories more accurate.

09 / The story

The next step: verify the running service

Start with the official PHP advisory, match your branch or vendor package to both fixes, replace running workers, and verify normal application behavior. Keep an inventory of completed and incomplete rollouts. Do not wait for a perfect public attack count before addressing a confirmed critical runtime flaw. [1]

This article is defensive educational reporting, not an incident-response service or a guarantee that a server is clean. We reviewed public sources on October 22, 2026; we did not test an exploit, audit readers’ servers or independently reproduce the memory bugs.

A closer look

Qlauson Team: evidence and practical limits

Sources reviewed October 22, 2026. This is a documentation-based guide, not a hands-on product test or benchmark. Recommendations are editorial judgments tied to the stated use case; provider claims are not independently reproduced.

Examples are illustrative, not real client projects or measured savings. Features, prices and availability can change. This is educational information, not legal advice, an endorsement or a promise about unannounced 2027 features.

Put it to work

Before you put this into practice

Apply these checks to your own situation:

0 of 6 considered

These questions are editorial guidance, not a product score or verified assessment.

Keep learning

Further reading

This article is Qlauson Team editorial guidance, not a product test or endorsement. Product details can change; verify them with the provider. See our Disclosure for how we approach coverage.
Share story

Read next

Should AI Agents Move Money? Permissions, Approvals and Audit Trails

Before AI agents move business money, separate payment drafting from release, bind approvals to exact details, set limits and keep an audit trail.

Continue reading

Newsletter

Get new Qlauson stories by email.

An occasional email when we publish a new guide or update an important one. No unrelated promotions, and you can unsubscribe from any email.

Read our Privacy Policy.

Good to know

Frequently asked questions

Is PHP2Shell an official CVE name?

It is a public nickname. The specific identifiers are CVE-2026-109618 and CVE-2026-109619; use those when matching vendor advisories.

Does updating my CMS fix PHP2Shell?

Not necessarily. These flaws are in PHP itself. Verify the PHP runtime handling requests and its vendor patch status as well as application updates.

Which PHP 8.4 release fixes the flaws?

The October 21 PHP advisory names 8.4.27. A distribution backport can also address them if its vendor explicitly confirms both fixes.

Is PHP-FPM automatically safe?

No. PHP includes PHP-FPM among web-serving installations at risk. A demonstration on one serving method does not establish safety on another.

Can a firewall replace the patch?

No. Request filtering can reduce exposure but does not repair PHP’s memory handling. PHP says updating is the complete solution.

Does the flaw require AI on my website?

No. The AI connection is an attributed account of assistance with research. The flaws concern PHP’s request processing.

Is an older version number proof that my distribution is vulnerable?

Not by itself. Distributions can backport security fixes. Check the exact package revision and vendor advisory for both CVEs.

Behind the article

Sources & how we organized the information

These are the primary documents used as references for this guide. Each note explains what the source covers.

  1. PHP: October 21 emergency security advisory

    Runtime scope, fixed versions, support limits and incomplete mitigations; reviewed directly.

    Source checked Oct 22, 2026 · Opens in a new tab.

  2. Google Cloud: responding to the two PHP CVEs

    Participant account of AI-assisted research, severity and platform-specific response guidance.

    Source checked Oct 22, 2026 · Opens in a new tab.

  3. Singapore CSA: PHP2Shell alert

    Government alert opened during research; public nickname and reported exploitation attempts. Direct re-fetch blocked; not evidence of compromise at a particular site.

    Source checked Oct 22, 2026 · Opens in a new tab.

How the information is organized

The short answer comes first. The main guide then covers What is PHP2Shell; What the two bugs do at a high level; Which versions contain the fixes; What about PHP 8.1 and older; Has exploitation been confirmed; How administrators can check patch coverage safely; Why temporary mitigations are not a complete fix; What does AI have to do with these vulnerabilities; The next step: verify the running service. Practical notes, a checklist, and FAQs turn those topics into questions to consider for your own situation.

Source documents describe provider features, technical guidance, or standards. Qlauson’s examples, comparisons, and checklists organize that information into practical advice; they are not original test results, a measured ranking, or a provider endorsement.

Product details and prices can change after a source is checked. Confirm current details with the provider before making a decision. References to future releases are possibilities, not confirmed availability.

Keep exploring

Related articles

Your curiosity. Our next story.

What should we explore next?

An AI question you can’t shake? A game-changing gadget? Software that deserves a closer look? Tell us what you want us to write about or research.

Big ideas. Small questions. All welcome.