Critical PHP RCE Bugs: How to Protect Laravel, CakePHP, and WordPress Sites
Two critical remote code execution vulnerabilities, CVE-2026-109618 and CVE-2026-109619, put PHP applications at risk. Here is what developers and site owners should do now.

If your site runs on PHP, update PHP now. On October 21, 2026, the PHP project fixed two critical bugs that can let an attacker run code on your server with a single web request and no login needed.
This is not a Laravel, CakePHP, or WordPress bug. It is in the PHP engine itself, so every app on an unpatched PHP runtime is exposed, whatever framework it uses. Updating Composer packages or WordPress plugins will not fix it. You need to update the PHP running on your server.
This post explains what the bugs are, how to check whether you are affected, and how to fix them in Laravel, CakePHP, and WordPress setups.
The two vulnerabilities
Both bugs are rated critical with CVSS v4.0 9.2. They are fixed in PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35. Every earlier version is affected.
| CVE | Name | What goes wrong |
|---|---|---|
| CVE-2026-109618 | RCE via OOM corruption | A crafted multipart request pushes PHP out of memory while request data is being prepared. Cleanup then trusts corrupted data. |
| CVE-2026-109619 | RCE via stale global state | A fatal request leaves state behind in a worker. The next request reuses it after its memory was freed. |
Which servers are at risk?
- Apache mod_php: highest risk. The PHP team confirmed full code execution for both bugs, triggered before your application code even runs.
- PHP-FPM (nginx, Apache with proxy_fcgi): at risk. Code execution through the session upload-progress path was confirmed for CVE-2026-109619.
- FrankenPHP and LiteSpeed (LSAPI): likely at risk, according to the PHP team.
- PHP 8.1 and older, including 7.x: affected and receive no official package update. The PHP team published source-only patches for PHP 7.4, 8.0, and 8.1.
Step 1: Check your PHP version
Check the PHP that serves web requests, not just the version on your command line. They are often different.
# Command-line PHP
php -v
# PHP-FPM (the binary name varies)
php-fpm8.3 -v
# Inside a Docker container
docker exec <container> php -vTo see the web version for sure, use a temporary file in your web root and delete it immediately after checking:
<?php echo PHP_VERSION, ' ', PHP_SAPI;If the version is lower than 8.5.12, 8.4.27, 8.3.36, or 8.2.35 on your branch, you are affected.
Step 2: Update PHP, or apply the stopgap
The only complete fix is updating PHP. On Debian or Ubuntu with the Ondřej Surý repository, for example:
sudo apt update
sudo apt install --only-upgrade 'php8.3*'
sudo systemctl restart php8.3-fpm # or: sudo systemctl restart apache2For Docker, rebuild on a patched official image such as php:8.3.36-fpm and redeploy.
If you cannot update today, apply these settings server-side in php.ini or the FPM pool file, then restart every PHP worker:
; php.ini or FPM pool
session.upload_progress.enabled = 0
post_max_size = 8M
upload_max_filesize = 6M
; PHP-FPM pool only; PHP 8.5 only
php_admin_value[memory_limit] = -1
fatal_error_backtraces = 0- Set them in server configuration only.
ini_set(),.user.ini, and.htaccesstake effect too late. - With
memory_limit = -1, use a container or cgroup memory limit instead. Do not use RLIMIT_AS or RLIMIT_DATA. - Optionally recycle workers with
pm.max_requests = 1, accepting the performance cost.
These settings reduce risk but do not remove it. Treat them as a bridge to an update, not a substitute.
Laravel
Laravel itself needs no code change. Update the PHP runtime underneath it.
- On Forge or your own VPS, update packages and restart PHP-FPM.
- For Laravel Sail, rebuild with
sail build --no-cache && sail up -d. - For custom Docker images, pin a patched base such as
FROM php:8.3.36-fpm. - For Laravel Octane, update PHP and reload workers with
php artisan octane:reload. - For Vapor, Laravel Cloud, and managed platforms, check the platform status or changelog and redeploy once patched runtimes are available.
Laravel 10 supports PHP 8.1–8.3, Laravel 11 supports 8.2–8.4, Laravel 12 supports 8.2–8.5, and Laravel 13 supports 8.3–8.5. Laravel 8 and older do not support a patched branch, so plan an upgrade.
CakePHP
CakePHP needs no application code change either. Update PHP and restart FPM or Apache. Put stopgap settings in the FPM pool or main php.ini, never in config/app.php or with ini_set().
- For Docker, bump the base image, rebuild without cache, and redeploy every container.
- For shared hosting or cPanel, select a patched PHP version or ask the host when it will be available.
- Review large upload limits and consider direct-to-storage uploads with presigned URLs.
CakePHP 5 requires PHP 8.2 or newer and runs on every patched branch. CakePHP 3 and 2 are end of life and should be treated as upgrade priorities.
WordPress
No WordPress core update, plugin, or security plugin can fix a vulnerability in PHP itself.
- Check the version under Tools → Site Health → Info → Server.
- Ask managed hosting providers whether your plan runs a patched build.
- Use the host PHP selector to choose a patched version on shared hosting or cPanel.
- On your own VPS, update PHP and restart PHP-FPM or Apache. Apache mod_php setups should be patched first.
- Back up first and test on staging before moving to a new minor version.
WordPress recommends at least PHP 8.3. Older plugins and themes are usually the blocker, so update them before changing PHP.
Stuck on PHP 7.x, 8.0, or 8.1?
- Move to a supported PHP version, ideally 8.3 or newer.
- Use a patched build from your Linux distribution or an LTS vendor. Source backport patches exist for 7.4, 8.0, and 8.1.
- Until then, reduce exposure with the stopgap settings and restrict public access with a VPN, IP allowlist, or suitable WAF rule.
PHP 7.3 and older get no patch, so moving to a supported version is the only real fix.
Quick checklist
- Check the PHP version serving web requests on every server and container.
- Update to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35, or newer.
- Restart every PHP-FPM, Apache, Octane, or FrankenPHP worker.
- Apply server-side stopgap settings if you cannot update immediately.
- Keep
session.upload_progress.enabled = 0if you do not use it. - Plan the move away from end-of-life PHP and framework versions.
Treat this as a runtime security update, not just framework maintenance. Patch PHP, verify the process serving requests, and keep the full application stack on supported versions.