🐘
Security

Critical PHP vulnerabilities: why you should not delay updating

21.11.2026
← All articles

Many site owners leave PHP untouched for years on the principle that a working site should not be touched. The catch is that PHP, like any software, has vulnerabilities that are found and fixed regularly, and fixes are published only for supported versions.

The PHP release lifecycle

Each PHP version receives active support, then a security-fixes-only period, and then reaches end of life, after which no vulnerability in it is officially fixed. Compare your version with the Supported Versions page on php.net. PHP 7.4 and older left support long ago, and 8.0 and 8.1 no longer receive official fixes either. Some distributions and panels backport patches, but that is no guarantee and rarely covers everything. The most reliable position is simply to run an officially supported release.

What is at stake

Some PHP flaws have been severe: CVE-2019-11043 allowed remote code execution on certain Nginx plus PHP-FPM setups, and CVE-2024-4577 was an argument injection in PHP running as CGI on Windows. In both cases a plain HTTP request could run code on the server, and fixes shipped only for supported versions. Old PHP also blocks CMS updates, because new WordPress, Joomla and Laravel releases raise their minimum PHP requirement, so CMS vulnerabilities stay open too.

Find the version your site really uses

php -v on the command line may differ from the version your site runs, since hosting often offers several. The most accurate check is through the site itself. Create a temporary file, look at the result and delete it right away, because it reveals details about your server:

<?php
// version.php: delete immediately after checking
echo PHP_VERSION;
php -v
php -m
sudo apt update && apt list --upgradable 2>/dev/null | grep php
sudo dnf check-update 'php*'

On your own VPS, keep minor releases (for example within 8.3.x) current, since that is how security fixes arrive. Minor updates rarely break compatibility, so they are good candidates for automatic updates.

Test compatibility before a major upgrade

Moving from 7.4 to 8.x, or from 8.1 to 8.3, means some old functions are removed or behave differently. For CMS sites, start by updating the core, theme and plugins, since their current releases are tested against modern PHP. For custom code, static analysis helps:

composer check-platform-reqs
find . -name "*.php" -not -path "./vendor/*" -exec php -l {} \; | grep -v "No syntax errors"
composer require --dev phpcompatibility/php-compatibility
vendor/bin/phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 8.3 --ignore=vendor

No tool catches everything, so run a copy of the site on the new version and manually test key pages, forms, payments and the admin area with error logging on. Deprecation notices tell you what will break next.

Example: a hotel website

A small hotel in Bukhara ran WordPress on PHP 7.4 with several neglected plugins, and the owner feared breaking the booking form. After a full backup, the site was copied to test.misol.uz with PHP 8.2, the core, theme and plugins were updated and two outdated plugins replaced. Testing revealed a removed function in an old plugin; after swapping it the form worked, and only then were the same steps repeated on the live site. It ended up safer and noticeably faster.

Switching PHP on hosting

On shared hosting the PHP version is chosen in the site settings of the panel. sayt.uz customers open ISPmanager from their cabinet and can change it there; afterwards check that extensions like intl, gd, mbstring and zip are enabled for the new version. Rolling back takes seconds, while every month of delay makes the eventual move harder and the exposure longer. One planned upgrade is always cheaper than cleaning up after an unexpected compromise.

Related articles

🈲 Japanese SEO spam hack: strange pages from your site appear in Google 📚 Securing an OJS Journal Site: Updates, File Storage and Bot Load 🧪 Exposed phpinfo() and leftover test files: why they matter 🚨 How to Tell Your Hosting Account Has Been Hijacked: Signs and Steps
🌐 Language
🇺🇿 O⁠'zbek 🇺🇿 Özbek (yangi) 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓