If your server runs PHP, update to a patched version today.
What’s going on
On October 21, 2026, the PHP project released fixes for two critical vulnerabilities in PHP itself, the language behind WordPress, Drupal, Joomla and Magento. They’re tracked as CVE-2026-109618 and CVE-2026-109619, and each is rated 9.2 out of 10. Both can allow remote code execution without a login, which means an attacker could run code on your server, steal data, install malware or take your site down. Some researchers are calling the pair “PHP2Shell.”
As I understand the technical reporting, one flaw comes from how PHP handles running out of memory, which can corrupt memory. The other comes from leftover internal state that survives after the memory behind it has been freed.
The scale is huge. PHP powers almost 70% of websites whose server-side language is known, and nobody yet knows how many installations are actually vulnerable.
The details leaked first
The flaws were meant to stay quiet until the patch landed, but details leaked early, and public exploit code appeared online hours before the fix. On the morning of the release, one security vendor said it hadn’t yet seen attacks across its customers, while others reported attacks emerging. I wouldn’t wait to see which is right.
Who’s affected
Every PHP version before 8.2.35, 8.3.36, 8.4.27 and 8.5.12 is affected. That covers any setup that serves web requests: PHP-FPM, Apache with mod_php, CGI, FrankenPHP and LiteSpeed. PHP singled out Apache with mod_php as especially exposed, because the attack can trigger before any of your application code runs.
PHP says there is no complete mitigation. Updating is the only real fix.
Step 1: Check which PHP version you’re running
You want the version your web server uses, which isn’t always the one your terminal reports. Check whichever of these apply to you:
- WordPress dashboard: Go to Tools → Site Health → Info → Server. The PHP version is listed there.
- Hosting control panel: cPanel (MultiPHP Manager), Plesk (PHP Settings) and most managed hosts show the version for each site.
- Command line:
bash
php -v
If you have several versions installed, also run ls /usr/bin/php*. On Debian or Ubuntu, update-alternatives --list php lists them too.
- Which handler you use:
bash
apachectl -M | grep php
If this shows mod_php, treat the server as high priority.
- Docker:
bash
docker run --rm your-image-name php -v
Run it against every image you deploy, including the forgotten ones.
- A temporary info page: Create a file containing
<?php phpinfo();, load it in a browser to see the real web-facing version, then delete it immediately. It exposes sensitive server details.
Then compare your result to the patched releases: 8.5.12, 8.4.27, 8.3.36 or 8.2.35. Anything older on those branches is vulnerable.
A caution about Linux distro packages. Debian, Ubuntu and Red Hat often backport security fixes without changing the headline version number. An older-looking version string may already be patched, and a matching one might not be. Check the package changelog for the CVE IDs:
bash
# Debian/Ubuntu
apt changelog php8.3-cli | grep -i CVE-2026-109618
# RHEL/Alma/Rocky/Fedora
rpm -q --changelog php | grep CVE-2026-109618
Step 2: Update, depending on what you run
Back up your site and database first. Then use the path that matches your setup.
Shared or managed hosting
- Ask your host whether they’ve deployed the October 21 PHP security release.
- Many hosts have added interim protections, such as disabling a risky setting, and are rolling out patched PHP builds as each vendor publishes them. That helps, but confirm the actual version yourself.
- In cPanel or Plesk, choose the newest patched PHP branch your site supports.
Ubuntu / Debian
bash
sudo apt update
sudo apt upgrade
sudo systemctl restart php8.3-fpm # use your version
sudo systemctl restart apache2 # or nginx
If the patched package isn’t available yet, check again later. Don’t assume you’re covered.
RHEL / AlmaLinux / Rocky / Fedora
bash
sudo dnf upgrade 'php*'
sudo systemctl restart php-fpm
sudo systemctl restart httpd
If you use the Remi repository, make sure the right module stream is enabled first.
Docker
- Rebuild from the updated base image instead of patching inside a running container:
bash
docker build --pull --no-cache -t your-image .
- Only pin a specific tag like
php:8.4.27-apacheif that tag actually exists in the registry. - Redeploy, then run
php -vinside the new container.
macOS (Homebrew, local development)
bash
brew update
brew upgrade php
Run php -v afterward to confirm the formula has picked up the patched release.
Windows / XAMPP
- Download the patched build from windows.php.net, or update your XAMPP bundle. Replace the old PHP directory and restart Apache.
Compiled from source
- Download the patched release from php.net, rebuild with your original configure flags, and restart your web server or PHP-FPM.
If you’re on an older PHP version
This is the hardest part of the story. The PHP project only supports 8.2 and newer, so PHP 8.1 and older get no official fix. Some Linux distributions, hosts and long-term-support vendors backport fixes themselves, so ask yours. If they don’t, upgrade to a supported version. Test on a staging copy first, because older plugins and themes can break.
Also note that PHP 8.2 only receives security fixes until the end of 2026, so if you’re on it, plan your next upgrade now.
If you can’t patch yet, consider isolating the site from the public internet until you can.
After you update
- Restart PHP-FPM and your web server, not just one of them.
- Re-check the version through the web (Site Health or phpinfo), not only the terminal.
- Look for signs of compromise: new admin accounts, unexpected PHP files in upload directories, and odd redirects.
The bigger lesson
This is the same pattern we saw earlier this year with WordPress: leaked details, public exploits, and a short window before mass scanning starts. Treat patching as an emergency, and don’t leave unmaintained PHP systems running. Inventory every PHP install you own, including the ones hiding inside vendor software, forgotten Docker images and old subdomains.
What I changed from the earlier drafts:
- Backports. I removed the claim that PHP itself released backports for 7.4, 8.0 and 8.1. The Cybernews article said so, but other coverage says the project only fixed 8.2 to 8.5 and that distros or vendors may backport on their own. I went with the more common account.
- mod_php. Earlier I implied it was the only risky setup. Coverage says every PHP that serves web requests is affected, with mod_php the most exposed.
- session.upload_progress tip. I removed it because it was never officially confirmed, and PHP says there’s no complete mitigation.
- New details. I added the plain-language description of the flaws, the 8.2 security-support end date, and the Windows download source.







