Skip to content

Home/ Blog /Web Design

The PHP Vulnerability and the Old Theme Trap

Oct 22, 2026 13 min read Web Design
The PHP Vulnerability and the Old Theme Trap

On October 21, 2026, the PHP project released emergency security updates for two critical flaws in PHP itself. Together they make up the PHP vulnerability that security reports call php2shell: an attacker with no login can make a web server run their own code. PHP rates both flaws 9.2 out of 10, and the first attack attempts came before the fix was public.

PHP is the language behind every WordPress site and behind a large share of the custom websites built over the last two decades. So this is not a problem for programmers only. If you own a website, the PHP version on your server decides whether you are exposed today.

And here is what worries us most. Most of the sites we come across that were built on WordPress or from scratch years ago have not had their PHP looked after since launch. Many run themes that stopped getting updates when their developers stopped maintaining and selling them, and their owners are stuck: if they update PHP, the site breaks. After this PHP vulnerability, staying on an old version is no longer an option.

This guide explains what happened, how to check your PHP version, the 7 steps to fix it and what to do when your theme is the reason you never updated.

What happened with the PHP vulnerability

The PHP project announced the problem on October 20 and published the fixes on October 21, 2026, at 14:00 UTC. Its security advisory calls them critical remote code execution vulnerabilities and asks everyone to update now. There are two flaws:

  • CVE-2026-109618. When PHP runs out of memory in the middle of a request, internal data can be left half built, and PHP may later treat it as valid. The project’s advisory on GitHub has the technical detail.
  • CVE-2026-109619. Data that belongs to one request can survive after its memory has been freed, and a later request handled by the same PHP process can use it. Its advisory is on GitHub too.

Both can be triggered from outside, with no account on the site. PHP scores them 9.2 out of 10 on the CVSS 4.0 scale. A score of 10 that circulated before the release was wrong, according to the PHP Foundation.

The attacks are real. Amazon’s threat intelligence team logged an attempt against its decoy servers on October 17, four days before the fix, and more on October 21. Cloudflare said the same day that it was seeing early attacks. One research team says it confirmed an attack against specific WordPress versions that works before any login. Tenable’s summary of php2shell collects these reports.

The PHP versions that fix it

PHP branch Fixed in What it means for your site
8.5 8.5.12 Update to 8.5.12 or newer
8.4 8.4.27 Update to 8.4.27 or newer
8.3 8.3.36 Update to 8.3.36 or newer
8.2 8.2.35 Update now, and plan a move: 8.2 gets no security fixes after December 31, 2026
8.1, 8.0 and 7.4 No official release End of life: move to a supported branch
7.3 and older No fix End of life: move to a supported branch

Look at the full number, not only the branch. A site on PHP 8.3.30 is on a supported branch, and it is still exposed until it runs 8.3.36.

Is your website affected?

If your website runs on PHP, assume the PHP vulnerability affects it until you have checked. The PHP project names every common way of serving PHP, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, and it considers the risk highest for mod_php, where an attack can run before any code of the website does.

That covers WordPress, WooCommerce stores, Drupal, Joomla, Magento, Laravel apps and any site written in PHP by hand. Updating WordPress, your theme or your plugins does not fix this PHP vulnerability. The fix lives in PHP on the server, and the PHP project says updating PHP is the only complete fix.

A desktop computer on an office desk with PHP code on the screen
WordPress, WooCommerce, Drupal, Joomla and Magento all run on the PHP installed on the server.

A site made only of HTML files, with no PHP on the server, is not touched by this flaw. Be careful with that answer, though: contact forms, booking tools and old admin areas often run on PHP even when the pages do not.

How to check your PHP version

You need the exact number, with all three parts, such as 8.3.36, to know whether the PHP vulnerability reaches your site. There are three ways to get it.

In WordPress

In the WordPress admin, go to Tools, then Site Health, then the Info tab, and open the Server section. The line called PHP version shows the number your site runs. WordPress also puts a PHP update notice on the dashboard when the version is too old, so if you have seen that box and closed it, now is the time to open it again.

In your hosting panel

Most hosting panels have a PHP section. In cPanel it is called MultiPHP Manager or Select PHP Version. The panel always shows the branch your site uses, such as 8.2 or 8.3, and some also show the exact release.

Ask your host or your developer

If you cannot find it, ask. The questions to send are in the section on what to ask your hosting company, further down this page.

The old theme trap: why so many sites never updated PHP

This PHP vulnerability lands on a problem we find in most of the sites built on WordPress or from scratch years ago. The site works, nobody touches the server, and the PHP version stays where it was on launch day. Sometimes that was five or six years ago.

The theme is usually the reason. Many themes stopped getting updates when their developers stopped maintaining and selling them. Their code was written for PHP 7 or older, and it breaks on newer versions. So the owner faces a choice with no good answer: update PHP and break the website, or leave PHP alone and keep a site that works. Most chose the second, and for years it looked like the safe choice.

Technically, the break is predictable. PHP 8.0 removed functions that older themes and plugins relied on, such as create_function() and each(), and a call to a function that no longer exists stops the page. In WordPress that shows up as a blank page or the message There has been a critical error on this website. Later versions added stricter rules that turn old habits into warnings and errors.

A developer with his hand over his eyes in front of a screen, frustrated
A theme written for PHP 7 can stop the whole page on PHP 8. That is the moment many owners decided to leave PHP alone.

Sites built from scratch years ago have the same problem with their own code: functions PHP has removed, such as the old mysql_ functions that disappeared in PHP 7.0, and libraries nobody has updated since.

After October 21, staying put stops being a choice. PHP 8.1 and older get no official fix for these flaws, and the attacks have already started. Sites in this situation will have to update PHP, no matter what, and fix whatever breaks.

If you are one of these owners, contact us. We will look at your theme and tell you whether we can fix it so you can update PHP.

7 urgent steps to fix the PHP vulnerability

1. Find your exact PHP version

Use Site Health or your hosting panel, as shown above, and write down all three parts of the number. If you look after several sites, check each one: two sites on the same hosting account can run different versions.

2. Compare it with the fixed releases

The safe versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or anything newer in the same branch. If your branch is 8.1 or older, there is no official release that closes the PHP vulnerability, and your next stop is step 5.

3. Ask your host to confirm the fix in writing

On shared and managed hosting, the host installs and runs PHP for you. Many hosts roll out security releases themselves, but do not assume it. Ask which exact PHP version your site runs and since when. A short written answer is worth keeping.

4. If you run your own server, update and restart PHP

Install the security update from your Linux distribution, or build the new release from PHP, then restart PHP-FPM or Apache so every PHP process runs the fixed code. A process that keeps running keeps the old code in memory.

If you cannot update today, the PHP project lists configuration changes that reduce exposure to some attack paths, such as turning off session upload progress, and Cloudflare has published firewall rules for traffic that passes through it. Both buy time. Neither one fixes the PHP vulnerability: the project is clear that updating is the only safe choice.

5. On PHP 8.1 or older, move to a supported branch

Back up the files and the database. Make a staging copy of the site. On the copy, update WordPress, the plugins and the theme, then switch it to PHP 8.3 or 8.4 and go through the pages that matter: the home page, the forms, the checkout and the admin area. Avoid 8.2 as your destination if you can, because it stops receiving security fixes on December 31, 2026.

Developers who compile PHP themselves can apply the minimal fixes the PHP security team published for 7.4, 8.0 and 8.1, and some Linux distributions and long-term support vendors ship patched packages. For a business website, both are a bridge, not a place to stay.

6. If the theme breaks, fix the theme, not PHP

When the copy breaks, the error message or the server log names the file and the line. If the theme still has a developer, look for a newer version first. If it was abandoned, the code can often be repaired: replacing the functions PHP removed and adjusting the parts PHP 8 treats differently. When a theme is too far behind, moving the content to a maintained theme or to a new design is the lasting answer.

Close-up of colored code on a dark computer screen
Repairing an abandoned theme means finding every place where its code calls something PHP no longer has.

What you should not do is switch the live site back to the old PHP and leave it there. After this PHP vulnerability, an old version is an open door.

7. Check for signs of an attack since October 17

Amazon’s threat intelligence team recommends reviewing activity back to October 17 at least, four days before the PHP vulnerability went public. Once PHP is updated, go through the signs in the next section, and change your passwords if anything looks wrong.

Signs your site may have been attacked

  • Administrator accounts you did not create.
  • Plugins, themes or files you do not recognize, especially PHP files inside the uploads folder.
  • Pages, links or redirects you did not add, often to spam or betting sites.
  • A warning from Google or the browser that the site is unsafe.
  • Unusual requests or errors in the server logs from October 17 onward.

If you find any of these, restore a clean backup from before October 17, update PHP before the site goes back online, and change every password: WordPress users, hosting, database, FTP and application passwords.

What to ask your hosting company

Send these questions in one message and keep the answers. They are your record that the site was checked.

  • Which exact PHP version does my site run today?
  • Does it include the security release of October 21, 2026 (8.5.12, 8.4.27, 8.3.36 or 8.2.35)?
  • If my site is on PHP 8.1 or older, do you offer a patched build, and until when?
  • Is my site served with mod_php, PHP-FPM or LiteSpeed?
  • Do you keep daily backups from before October 17, and how do I restore one?

PHP vulnerability FAQ

What is php2shell?

php2shell is the nickname security reports use for the two flaws fixed on October 21, 2026: CVE-2026-109618 and CVE-2026-109619. Both let an attacker run code on a web server without logging in. The PHP project’s own name is plainer: critical remote code execution vulnerabilities.

Is WordPress affected by the PHP vulnerability?

Yes, if the server runs an unpatched version of PHP. WordPress is written in PHP, so the flaw sits underneath it. Updating WordPress, the theme or the plugins does not close it. The fix is the PHP update on the server, and the PHP project says it is the only complete fix.

Which PHP version is safe now?

The fixed releases are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, plus anything newer in the same branch. For a business website, 8.3 or 8.4 is the sensible target, because 8.2 stops getting security fixes on December 31, 2026.

How do I check my PHP version in WordPress?

In the WordPress admin, go to Tools, Site Health, Info, and open Server. The PHP version line shows the exact number. If you do not have admin access, your hosting panel or your host’s support team can tell you.

Does my hosting company update PHP for me?

Often, but not always, and not for every version. Hosts usually install security releases for the PHP branches they support. If your site is set to an old branch, such as 7.4 or 8.0, there may be no fixed build to install. Ask your host to confirm the exact version in writing.

My site runs PHP 7.4 or 8.0. What now?

The PHP project no longer releases updates for 8.1 and older. Its security team published minimal fixes as source code for 7.4, 8.0 and 8.1, which only help people who build PHP themselves, and some vendors ship patched packages. The lasting answer is to move the site to PHP 8.3 or 8.4, which usually means fixing or replacing an old theme first.

Is a firewall enough to stop the PHP vulnerability?

No. Firewall rules, like the ones Cloudflare published for this flaw, block the attacks they recognize, and only for traffic that passes through them. The PHP project says its own workarounds do not make an installation safe either. They buy time until PHP is updated.

Will updating PHP break my website?

It can, if the theme or a plugin uses code that newer PHP removed. That is why the update goes on a staging copy first. If something breaks, the error points to the file and the line, and the fix belongs in the theme or the plugin, not in staying on old PHP.

How do I know if my site was hacked?

Look for new admin users, files and plugins you do not recognize, pages or redirects you did not create and warnings from Google or the browser. Check the server logs from October 17 onward. If anything looks wrong, restore a clean backup from before that date and change every password.

Does the PHP vulnerability affect sites built without WordPress?

Yes, if they run on PHP. Drupal, Joomla, Magento, Laravel and sites written in PHP from scratch all depend on the PHP version on the server. A site made only of static HTML files is not affected by this flaw, although its forms or tools may still run on PHP.

Stuck on an old theme? Talk to us

If your website has stayed on the same PHP version for years because the theme breaks every time someone tries to update it, this PHP vulnerability is the moment to sort it out. Contact us: we will look at your theme and tell you whether we can fix it so you can update PHP.

And if you would rather have someone keep an eye on this for you, our Care plan includes updates every week, backups every day and security watched around the clock.

Send us your website and get a plan and a quote within 24 hours.

Avatar of eliana

eliana

Planet Media

More about the team
Cover of Digital Marketing for Green Small Businesses: The 2026 Guide

Digital marketing for green small businesses: the 2026 guide

31 pages on strategy, websites, Google, AI answers, ads, social media, email and green claims, with a calendar and a 30-day plan. Leave your email and download it.

You will also get our Monday newsletter. Unsubscribe anytime. Privacy policy

Is your website clearly communicating your impact?

Send us your website and get a plan and a quote within 24 hours.

Get a quote
Questions? Toco answers.