/how do i apply the latest php patch?
The latest PHP patch is 8.5.13, 8.4.28, 8.3.37 or 8.2.36 (or 8.6.0), released on November 19, 2026. It fixes seven critical CVEs and includes the October PHP2Shell fixes. Update PHP through your package manager, Docker images or the official Windows builds, then restart PHP-FPM or Apache and confirm the version your web server is running. If you can’t patch yet, disable session upload progress and persistent FastCGI connections as a stopgap.
The latest PHP security patch shipped on November 19, 2026. If you run any supported PHP branch, this is the version to be on:
| Branch | Patched version |
|---|---|
| PHP 8.6 | 8.6.0 |
| PHP 8.5 | 8.5.13 |
| PHP 8.4 | 8.4.28 |
| PHP 8.3 | 8.3.37 |
| PHP 8.2 | 8.2.36 |
These releases fix 18 vulnerabilities, seven of them critical, in PHP-FPM, session handling and core memory management. They also include October’s emergency fixes for PHP2Shell, the actively exploited PHP vulnerability behind CVE-2026-109618 and CVE-2026-109619. One upgrade covers both.
PHP 8.1 and earlier are end-of-life and won’t receive this patch, even though PHP2Shell affects code all the way back to PHP 5.4. If you’re on an older branch, see the section on what to do if you can’t patch yet.
How to Patch PHP (By Install Method)
How you apply a PHP patch depends on where your PHP came from. Most environments use more than one of these, so work through each one.
- Debian and Ubuntu packages. Run sudo apt update && sudo apt upgrade and confirm the PHP packages were included. If you use a third-party repository for newer PHP versions, make sure it has published the patched builds too.
- RHEL, Rocky, AlmaLinux and Fedora. Run sudo dnf upgrade ‘php*’ to pull the patched packages from your configured repositories.
- A note on distro packages. Linux distributions often backport security fixes without changing the upstream version number, so a patched package can still report something like 8.2.35. Check your distro’s security tracker for each PHP CVE rather than relying on the version string alone.
- Docker. Update the FROM line in your Dockerfiles to a patched tag (for example php:8.4.28-fpm), rebuild the images and redeploy every container that uses them. A floating tag like php:8.4 only picks up the patch once you pull the new image and rebuild.
- Windows. Download the new builds from windows.php.net and replace your existing PHP installation.
- Source builds. Download the patched source from php.net, then rebuild and reinstall with your existing configure options.
- Managed hosting and PaaS. Most providers patch the runtime for you, but confirm it. Check the provider’s status page or the PHP version your app reports.
- Appliances and vendor software. Firewalls, VPN gateways and commercial apps often bundle their own PHP. You can’t patch those directly, so apply the vendor’s update as soon as it’s available.
Restart and Verify
Installing the patch is only half the job. PHP-FPM and Apache with mod_php keep the old code loaded in long-running worker processes, so a patched server can still be running vulnerable PHP until it restarts.
- Restart PHP. Restart the PHP-FPM service (for example sudo systemctl restart php8.4-fpm) or Apache if you use mod_php. Restart the master process, not just the web server in front of it.
- Check the version the web server uses. The command-line php -v and the PHP your web server runs can be different builds. Confirm the web-facing version through phpinfo() on a private page, or your monitoring, and remove any temporary phpinfo() page afterwards.
- Confirm against the advisory. Make sure the version, or your distro’s package release, matches the fixed version for each CVE you’re addressing.
- Rescan. Run your vulnerability scanner again so the finding closes with evidence, not just a ticket marked done.
That last step is where vulnerability remediation often breaks down. A patch that’s installed but not verified is easy to miss until the next scan, or the next incident.
If You Can’t Patch Yet
Sometimes a PHP patch can’t go out immediately because of a change freeze, a vendor appliance or a legacy app pinned to an old version. In those cases, vulnerability mitigation buys time, but it doesn’t replace the patch.
- Disable session upload progress. Setting session.upload_progress.enabled = 0 in php.ini closes several of the session-based attack paths, including CVE-2026-115560. Restart PHP for it to take effect.
- Turn off persistent FastCGI connections. CVE-2026-129289 only works when the web server reuses connections to PHP-FPM. Disabling that (for example, fastcgi_keep_conn off in nginx) closes the path until you can upgrade.
- Add WAF rules. Many web application firewall vendors have shipped rules for PHP2Shell. They reduce exposure at the edge but won’t catch every variant.
- Restrict exposure. Take admin panels and non-essential PHP endpoints off the internet, or put them behind a VPN or access controls.
If you’re on an end-of-life branch, mitigations aren’t a long-term option. Plan an upgrade to a supported branch, or use a commercial extended-support build that backports the 2026 fixes.
Making the Next PHP Patch Faster
PHP2Shell was exploited four days before its patch existed, and attacks spread within hours of release. The teams that got through it fastest weren’t the ones with the best tools. They were the ones who already knew where PHP was running.
- Know where PHP runs. Keep an asset inventory that records PHP versions across servers, container images, managed platforms and appliances. Then the next PHP patch is a lookup, not a hunt.
- Watch for advance notice. PHP pre-announced both of its 2026 security releases, a day before each patch shipped. Subscribe to PHP’s news and the php-src security advisories so that day is spent preparing, not reacting.
- Patch exploited flaws first. When a PHP flaw lands in the CISA Known Exploited Vulnerabilities catalog, it jumps to the top of the queue. Good vulnerability prioritization puts internet-facing, exploited instances ahead of everything else.
- Set a days-long target for critical runtime patches. A monthly patch window is too slow for a critical, actively exploited flaw in the runtime under every PHP app you run.
Stay updated on Seemplicity blog
Subscribe today to stay informed and get regular updates from Seemplicity.





