Skip to content
ONDI
Illustration of Jeensuk Yang of ATATAKAI Digital explaining the order of steps for fixing a PHP vulnerability
Back to the journal

PHPFree · Web security · Fix guide

Web security · PHP · How to respondAll PHP vulnerability guides

PHP vulnerability fix guide: from checking to moving off PHP

What to do about PHP2Shell, in order: check your real PHP version, update and restart, mitigate if you can't, look for intruders, and consider going PHP-free.

By Jeensuk YangFor 25 years, led IT teams on Korea–China–Japan–US global projects with large companies in the Japanese and US markets, including Fujitsu, Meta and Amway. Now putting that experience to work on small businesses’ first step.

9 min read

Who this is for

  • You heard about PHP2Shell and thought, "OK, but what do we actually do?"
  • You run a WordPress business site yourself, or a developer runs it for you
  • You're wondering whether to keep using PHP at all

What you'll learn

  • The order to work in: check, update, mitigate, inspect, and what each step involves
  • The cautions PHP, CISA and major hosts all agree on
  • What a site without PHP can and can't do, as the root fix
Jeensuk Yang with a determined expression
A note from Jeensuk

You know the risk. Now, what do you do?

Worry comes from not knowing. Once you know the order, worry turns into a to-do list. Our risk series covered what went wrong. This guide is the next part: what to do, and in what order, on one page. It follows the steps that the PHP project, CISA, and the hosts and security firms behind the fixes recommend.

01The whole flow

What should you do first about a PHP vulnerability?

Check, update, mitigate, inspect. Do these four steps in order. As of October 25, 2026, the PHP project and CISA, the US cybersecurity agency, point to the same order.1·2

Say you hear burglars are working your neighborhood. First you look at what kind of lock you have. If it's weak, you replace it. Until the new one is in, you slide the bolt. Then you walk through the house to make sure nobody's already been inside. Handling a PHP hole works the same way.

  1. Check: the PHP version your website really runs, and who manages your server
  2. Update: move to a fixed release (8.5.12 / 8.4.27 / 8.3.36 / 8.2.35 or later) and always restart
  3. Mitigate: if you can't update right away, buy time with PHP settings (php.ini) and a web application firewall (WAF)
  4. Inspect: look for signs that someone got in before the fix, and change your passwords
  5. Root fix: for a company website, consider a setup that doesn't run PHP at all

On shared or managed hosting (where the hosting company runs the server for you), most hosts handled step 2 for their customers. A tenant doesn't fix the building's boiler. Your first move is to read your host's notice.

Just go top to bottom. Jeensuk Yang pointing to the steps in order
There are no complete mitigations, updating is the only safe choice. — PHP Group release notes, Oct 21, 2026

Everything other than the update just buys time. The PHP project says settings changes "reduce exposure" but "do not make an installation safe."1

Jeensuk's takeWith an order to follow, there's no need to panic. Just don't skip step 2, replacing the lock, and stop at step 3, sliding the bolt.

02Step 1 · Check

Step 1: How do you find your site's real PHP version?

Look at the PHP that actually serves your web pages. Running php -v on the server shows the command-line PHP, which can differ from the PHP-FPM process (the program that runs PHP for each page request) your site uses.

If your house has several clocks, the kitchen clock isn't right just because the living room clock is. Vercel's advice puts it simply: "Verify that the deployment serving web requests is running the patched runtime."3

The other trap is the version number. A number is just the label on the outside. Linux distributions such as Ubuntu and Red Hat often keep the old number and slip the fix in. Red Hat says that "just looking at the version number of a package will not tell them if they are vulnerable or not."4 In that case, check the package changelog for the CVE number (the worldwide ID each vulnerability gets).

How your site is hostedHow to check
Shared or managed hostingRead your host's notice to see whether they've patched. On WordPress, see your PHP version under Tools → Site Health → Info → Server5
VPS or your own serverCheck the web PHP separately (for example php-fpm -v), and look in the package changelog for CVE-2026-109618
Containers (Docker)Confirm the image is pinned to a fixed version and that you've redeployed a new image3
Not sureAsk your host's support or your developer: "Is our site's PHP patched for PHP2Shell?"

Many hosts said customers didn't need to do anything. Hostinger said every plan except VPS needed no action,6 and Kinsta patched PHP 7.4 through 8.5 for its customers.7

Jeensuk's takeDon't decide "we're fine" or "we're in trouble" from one number. The first question is, "Who looks after our server?" Once you have that answer, the rest gets easier.

03Step 2 · Update

Step 2: Why restart after you update?

Because the PHP processes already running (called workers) keep holding the old code. Hostinger's advice to people who run their own PHP was to "update it and restart it now."6

Buying medicine doesn't cure you. Taking it does. Installing new PHP isn't enough while the workers already on the job keep using the old one. A restart swaps those workers for new ones running the fixed PHP.

On Debian or Ubuntu, that usually means updating packages with apt; on Red Hat–family systems, with dnf. Then restart PHP-FPM or Apache. These commands update other software too, so do it at a quiet time. Containers can't be fixed from the inside. Vercel's advice is to "rebuild with an updated PHP base image and redeploy."3

KEY POINTUpdate → restart → check the version again from the web. These three go together.

PHP 8.1 and older get no official fixed release. This time the PHP team published only minimal source patches for them, and the vendor packages to check are your Linux distribution's.1 CISA's advice for anyone who can't update or is on 8.1 or older: take the site offline until it's patched.2

Jeensuk's take"We updated" and "we're done" aren't the same thing. You're done when you've restarted and checked again from the web.

04Step 3 · Mitigate

Step 3: What if you can't update right away?

Put temporary settings into php.ini (PHP's settings file) or the PHP-FPM pool settings, then restart every worker. It isn't full protection.1

It's like taping plastic over a broken window on a rainy night. It keeps tonight's rain out, but you haven't replaced the glass.

SettingWhat it does
session.upload_progress.enabled = 0Turns off the upload-progress feature. It also covers the separate bug announced on October 231·8
memory_limit = -1Removes the memory cap. Set it with php_admin_value so apps can't override it, and don't use RLIMIT_AS or RLIMIT_DATA instead1
post_max_size = 8MLimits request size. If you need uploads, use 32M and keep upload_max_filesize below it1
fatal_error_backtraces = 0PHP 8.5 only1
Watch out: The PHP project says not to rely on ini_set() or FPM .user.ini for these, and that hiding error messages with display_errors or error_reporting "does not help."1 Removing the memory cap also means one runaway request can eat the server's memory, so in my view you should keep other limits, such as the number of PHP processes, in place.

A WAF is a guard at the door who turns away suspicious requests. It buys time too. Cloudflare rolled out protection on "all plans with WAF deployed, including Free users," but warned that sites that changed session.upload_progress.name "are not covered by the WAF rule."9

Even so, CISA says a WAF "may provide some protection" and still tells you to update, or go offline until you can.2 Cloudflare itself says customers should patch "even with WAF protections."9 A guard at the door doesn't fix the lock.

Jeensuk's takeOn the day you put in a temporary fix, also decide who will update and by when. It's only "temporary" if there's an end date.

05Step 4 · Inspect

Step 4: How do you check whether someone already got in?

Look in three places: logs, processes and files. And before you restart or rebuild anything, save the logs. TechTarget's advice: "Preserve all server logs from Oct. 20 onward."10

A house a burglar has visited has traces: footprints at the door, a stranger inside, things that weren't there before. On a server, those are the logs (the server's visitor record), processes (the programs running right now) and files. Here's what the investigators list.

  1. Logs: unusual multipart requests (the format used to send files) followed by memory-limit errors or repeated HTTP 500 errors11
  2. Processes: PHP workers launching shells or downloading tools, or unexpected child processes of the web server2·12
  3. Files and accounts: web shells (back-door files planted to control a server from outside), unexpected or modified PHP files, new admin users and unusual outbound connections. CybelAngel suggests looking back to at least June 202612
  4. Passwords and keys: the bugs could expose passwords, tokens and API keys from PHP's memory,11 so rotate database and admin passwords and API keys. If you suspect a break-in, isolate the system and preserve evidence first13
Be careful: Don't run "scanner" or "defense" scripts from unknown GitHub accounts straight on your live server. A study of GitHub proof-of-concept repositories found about 2.5% may be malicious.14 Read the code first, and run it only somewhere isolated.

Our risk series covers this in more detail in "What if someone got in before the patch? Three signs" (English edition coming soon).

Jeensuk's takeNo traces doesn't prove nobody came. Changing the keys doesn't take much effort, so changing passwords is the one step I recommend to everyone.

06If something breaks

What if your site breaks after the update?

Usually it comes back once you find the plugin or theme causing it and turn it off or replace it. WordPress can log errors to wp-content/debug.log, which shows which file failed.15

Kinsta notes the culprit is "almost always a plugin or an active theme," and advises testing in a staging copy first.16 WordPress also says not to leave debug tools on for a live site, so turn the log off once you've found the cause.15 That's why everyone says: back up before you update, and try it in a test copy if you can. A backup is a bridge back. A river with a bridge across it isn't scary.

In my experience, a security fix within the same branch (say 8.3.x to 8.3.36) rarely breaks a site. The trouble usually comes with big jumps, like moving from 7.x to 8.x.

Jeensuk's takePutting it off because "the site might break" is the riskiest choice. With a backup, you can always go back to yesterday.

07The root fix

The root fix: what happens if your site stops using PHP?

You no longer need PHP updates, restarts or checks. In exchange, the jobs PHP did, like forms, search and comments, need another solution.

A PHP site is a restaurant that cooks every order from scratch. A static site (one that serves only HTML files made in advance) is a shop that hands out meals already boxed. No stove, no kitchen fire. But it's harder to make something different for every customer.

Tools such as Simply Static turn a WordPress site into "static HTML files,"17 and Cloudflare's official docs show how to put those files on Cloudflare Pages.18

A good fit
  • A company website of about 10 pages
  • Updated a few times a month
  • Needs little more than a contact form
Not a good fit
  • Online stores and member sites
  • Sites with bookings, search and other features
  • Several people posting every day

The official pages are honest about the limits: in the free version, forms and search won't work,17 comments aren't supported, and you need a new export every time you change something.18 ATATAKAI Digital's PHPFree handles that move and the running of the site afterward.

Jeensuk's takeNot every site needs to move. But for a company website, there's a way to drop steps 1 through 4 for good. You can lock your doors well, or you can have fewer doors to guard.

FAQ

Frequently asked questions about fixing PHP vulnerabilities

I'm on shared or managed hosting. What do I need to do?

Start by reading your host's notice. Many, such as Hostinger and Kinsta, said they handled it for customers. If you're on an old, unsupported PHP version, switch to a newer one in your hosting dashboard.

php -v shows an old number. Am I at risk?

Not necessarily. It may be the command-line PHP, and Linux distributions often fix packages without changing the number. Check the PHP that serves your web pages and the package changelog.

Is it enough to add the temporary php.ini settings?

No. They lower the risk but aren't a complete fix. The real fix is updating to a patched release.

If I use a WAF, am I safe?

No. A WAF buys time. It doesn't replace updating PHP, and even Cloudflare tells its customers to patch.

SOURCES

  1. PHP Group, "Security advisory: Critical remote code execution vulnerabilities, update now" (Oct 21, 2026) php.net
  2. CISA, "Critical Vulnerabilities in PHP Require Immediate Patching" (Oct 21, 2026; revised Oct 23) cisa.gov
  3. Vercel, "PHP security advisory: php2shell" vercel.com
  4. Red Hat, "Security Backporting Practice" redhat.com
  5. WordPress.org, "Site Health screen" (updated Jul 12, 2026) wordpress.org
  6. Hostinger, "Hostinger deploys protections against php2shell PHP vulnerabilities" (Oct 21, 2026; updated Oct 23) hostinger.com
  7. Kinsta, "PHP2Shell: How Kinsta protected WordPress sites" (Oct 23, 2026) kinsta.com
  8. PHP Group, "Informational advisory: Session upload progress" (Oct 23, 2026) php.net
  9. Cloudflare, "Cloudflare deploys protections against php2shell vulnerability" (Oct 21, 2026; updated Oct 23) cloudflare.com
  10. TechTarget, "PHP2Shell: 22M exposed servers at risk as emergency patches released" (Oct 21, 2026) techtarget.com
  11. Wiz Research, "PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet" (Oct 21, 2026) wiz.io
  12. CybelAngel, "2.24M Internet-Facing PHP Hosts, 59% on Versions With No Fix Coming: What We Know About php2shell" (Oct 21, 2026) cybelangel.com
  13. ThreatLocker, "PHP2Shell: Why organizations must patch critical PHP vulnerabilities now" (Oct 21, 2026) threatlocker.com
  14. El Yadmani et al., "SecurePoC: A Helping Hand to Identify Malicious CVE Proof of Concept Exploits in GitHub" (USENIX WOOT '25) usenix.org
  15. WordPress.org, "Debugging in WordPress" (updated Oct 14, 2026) developer.wordpress.org
  16. Kinsta, "How to update the PHP version in WordPress" (updated Jun 8, 2026) kinsta.com
  17. WordPress.org Plugins, "Simply Static" (updated Oct 24, 2026) wordpress.org
  18. Cloudflare Pages docs, "Deploy a static WordPress site" (updated Apr 21, 2026) developers.cloudflare.com
PHPFree fix series

This guide is the hub. Each step gets its own detailed article. More English editions are on the way.

  1. PHP vulnerability fix guide (this article)
  2. Upgraded PHP and got a white screen? Causes and how to roll back (coming soon)
  3. Where to check and change your PHP version, host by host (coming soon)
  4. Is there a back door left on your site? A self-check for web shells (coming soon)
  5. Moving WordPress to a static site: how and what it costs (coming soon)

To understand what went wrong, start with risk series part 1, "What is PHP2Shell?" More articles on the ATATAKAI Digital blog.

PHPFree 30-second check · Free

Which step should your site start from?

Enter your site address and we'll tell you right away whether it runs on PHP and where your host stands. If you're not affected, we'll say so plainly: "No need to move right now."

Run the free 30-second check

Want to talk it through after you see the result? Contact ATATAKAI Digital

Updated Oct 26, 2026

Read next

A shared mail building’s broken entrance exposes six mailbox groups, and a gloved hand takes the spilled mail.
Web Security1 min read

One email platform was breached, and 12.23 million users of six internet providers were hit together

One KDDI email platform was breached, and 12.23 million users of six Japanese internet providers were hit. What to check if your company uses ISP email.

Customer cards combining profile, email and telephone icons spill from a membership app, with restaurants in the background.
Web Security1 min read

One app was breached, and names, emails and phone numbers in 10,788,963 member records leaked together

Names, emails and phone numbers in 10,788,963 Yakiniku King app member records leaked. The cause is not disclosed. What users and app operators should check.

A typo here, a clumsy button there.

This site is still being polished. Spot something? Tell us — we’ll fix it and send a small thank-you gift.

🎁 Thank-you gift