News · 10 min read

PHP2Shell Explained: The AI-Found PHP Flaw and How to Check Your Website Today

PHP2Shell is two flaws in PHP (the software that runs website code on a server), fixed on October 21, 2026. Wiz, which found them with help from AI, says PHP powers 70% of websites.

What you need to know is simple: a WordPress update does not fix this, and only your host or server admin can confirm the fix on your site. Governments in the US and Japan asked owners to act the same night.

Here is what the flaws do, what is confirmed so far, and the steps to check and update the PHP behind your own site today.

Executive Summary

  • PHP released fixes on October 21, 2026 in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
  • The flaws can let a stranger run their own code on a web server without logging in, and AWS saw attack attempts from October 17, four days before the fix.
  • Updating WordPress or its plugins does not fix PHP2Shell; the PHP on your server must be updated, usually by your web host.
  • Check your PHP version in WordPress under Tools, Site Health, Info, Server, then ask your host to confirm the fix in writing.
  • For private AI work, Elephas hides personal details on your Mac before any cloud model sees them, and its local models send nothing at all.

PHP2Shell Lets Attackers Reach the Server Before Your Site Even Starts

The two flaws are CVE-2026-109618 and CVE-2026-109619 (public ID tags for security flaws), and they can let an attacker run code on a server without a password.

Our October 22, 2026 card showing the two PHP2Shell flaws and what each one can lead to
Our October 22, 2026 card showing the two PHP2Shell flaws and what each one can lead to

The first flaw happens when PHP runs out of memory halfway through a task and then cleans up data that was only half ready. The first PHP advisory confirms a working attack on mod_php (PHP running inside the Apache web server).

The second flaw leaves bits of an old visit behind in memory, and a later visit can misuse them. The second PHP advisory confirms attacks this way too, depending on how the site is set up.

Both flaws sit in PHP itself, not in your website's code. That is why a site with no buggy plugins can still be open.

AI Helped Find the Flaws, and Attacks Started Before the Fix

Wiz used AI models to build working attacks, and AWS spotted the first attack attempt on October 17, four days before the public fix.

Our October 22, 2026 timeline of PHP2Shell, from the first attack attempt on October 17 to government warnings on October 21 and 22
Our October 22, 2026 timeline of PHP2Shell, from the first attack attempt on October 17 to government warnings on October 21 and 22

Wiz's research says it used Gemini 4 Argon and GPT-5.6 Sol, and says Gemini played a big part in finding the flaws. That shows what AI can now do for researchers. It does not prove that criminals used AI in the attacks seen so far.

AWS's report found attempts against MadPot (fake servers AWS runs to watch attackers). AWS says it is unclear whether those attempts would have worked on real sites. The sources we checked do not name any confirmed hacked businesses.

The NSA told organizations on X to take systems offline if they could not update right away. Japan's Prime Minister Takaichi Sanae posted that day. In our translation of her Japanese post, she asked owners to check if their sites use PHP and to get ready for the patch (the software fix) due that night.

Our October 22, 2026 card of the NSA and Prime Minister Takaichi posts on X from October 21, with our English translation of the Japanese post
Our October 22, 2026 card of the NSA and Prime Minister Takaichi posts on X from October 21, with our English translation of the Japanese post

Four Fixed PHP Versions Came Out, but Each Site Still Needs a Check

We read PHP's public release data on October 22, and it listed four fixed versions, all dated October 21.

Our October 22, 2026 check of PHP's release data, listing PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 as the fixed versions
Our October 22, 2026 check of PHP's release data, listing PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 as the fixed versions

We ran a short script that asks PHP's release service for the newest version in each supported line. It printed 8.2.35, 8.3.36, 8.4.27 and 8.5.12, which match the PHP release notice. We only read release data. We did not test any attack or any site.

A fix being out is not the same as your site having it. The fixed PHP must be installed and running on the server that answers your visitors. We built the table below from the two PHP advisories to show what each setup means for you.

Your setupWhat the advisories sayWhat to do
Apache with mod_phpWorking attacks confirmed, even before site code runsGet fixed PHP installed and running
PHP-FPMA working attack confirmed in some site setupsUpdate anyway; do not assume you are safe
PHP 8.1 or olderNo longer fixed by the PHP projectAsk your host for a patched package or move to a fixed release of 8.2 or newer
Already updatedThe version number alone may not prove itAsk the host to confirm both CVE fixes

For more on breaches and data safety, read our guides on whether ChatGPT got hacked and local versus cloud AI.

How to Update PHP on WordPress Today

To update PHP on WordPress, first check your version under Tools, then Site Health, then Info, then Server, and then ask your host to install the fix.

Our October 22, 2026 card with five steps for a WordPress PHP update, from checking Site Health to getting written confirmation from the host
Our October 22, 2026 card with five steps for a WordPress PHP update, from checking Site Health to getting written confirmation from the host

WordPress.org says no WordPress update is needed or planned for these flaws, and points owners to their hosting company. A WordPress PHP update means updating the PHP software on the server, not WordPress itself.

Take a backup first. Then ask your host to install the fixed PHP, restart PHP and confirm the new version. If you run your own server, you or your server admin must do these steps. Afterward, open your key pages, forms and checkout to make sure they still work.

A WAF (web application firewall, a filter that blocks bad traffic before it reaches your site) can help while you wait. Cloudflare turned on protection for its WAF customers, but still says you must update PHP.

Message to send your host: "Please confirm that the PHP running each of my sites has the fixes for CVE-2026-109618 and CVE-2026-109619.

Tell me the fixed version or package number, and confirm PHP was restarted. If the work is not done yet, tell me when it will be and what protects my site until then".

Elephas Is a More Private Way to Use AI on Your Documents

Flaws like PHP2Shell show that online tools run on servers you cannot see, and cloud AI tools such as ChatGPT, Gemini and Claude work the same way.

Our screenshot of the Elephas security page on October 22, 2026, showing what leaves your computer on each of the three ways to get an answer
Our screenshot of the Elephas security page on October 22, 2026, showing what leaves your computer on each of the three ways to get an answer

What ChatGPT, Gemini and Claude Receive

When you use ChatGPT, Gemini or Claude, every question you type and every file you upload goes to that company's servers to make the answer. Depending on your plan and settings, your chats can be kept and may be used to train their models.

Elephas Hides Personal Details Before a Cloud Model Sees Them

With Elephas, names, emails and phone numbers are hidden on your Mac before a cloud model sees your question. Elephas AI runs its models in Elephas's own cloud, and your question and passages are not stored or used to train AI.

Elephas Local Models Send Nothing at All

With an Elephas local model (AI that runs on your own computer), the answer is made on your Mac, so your questions and documents are not sent anywhere.

Elephas Team Sets One Privacy Policy

Team costs $29 per person per month. The owner decides which models members may use and whether hiding personal details is required, so the whole team follows one policy.

Conclusion

PHP2Shell is serious, but the fix is clear: get the patched PHP running on your server and get proof from your host. A short record now saves you from guessing later.

Private AI for your documents, on your Mac

Elephas answers from the files on your Mac, and with its on-computer model your questions and documents are not sent anywhere. On cloud routes it hides names, emails and phone numbers on your computer first. Plans start at $19 a month, and Team is $29 per person per month.

Start the 7-day free trial
Selvam Sivakumar
Written by

Selvam Sivakumar

Founder, Elephas.app

Selvam Sivakumar is the founder of Elephas and an expert in AI, Mac apps, and productivity tools. He writes about practical ways professionals can use AI to work smarter while keeping their data private.

← Back to Resources

Related Resources

Explore all AI Privacy & Security resources
news

Railway Hack and Zeabur Breach: Your AI Keys May Be Exposed

The Railway hack may have exposed customer secrets. Read what Railway and Zeabur confirmed, which AI keys to replace, and the recovery steps to take now.

11 min read
news

Meta Muse Shared Chats Exposed: Keep Private Work Out of Meta AI for Now

Meta Muse shared chats revealed private work records. See why calling Meta AI safe for private work needs care, what Meta changed, and how to protect files.

9 min read
news

eMudhra Private Keys: What a Key of 4 Means for the Files You Upload

eMudhra private keys were numbers below 256. What the eMudhra certificate compromise means for files you upload, who was safe, and what to do on a Mac.

12 min read
guide

How to Organize ChatGPT Projects

How to organize ChatGPT Projects: one project per ongoing outcome, a naming formula, safe backlog triage, a split rule, and a 10-minute weekly cleanup routine.

16 min read