php2shell: two exploited PHP flaws that need an upgrade today
In October 2026 PHP fixed two memory-safety flaws in its core, CVE-2026-109618 and CVE-2026-109619. Both let an attacker run code on the server without logging in, and both are on the CISA list of actively exploited vulnerabilities. If your website runs on PHP, including WordPress, check your version today.
- CVE
CVE-2026-109618 - SeverityCVSS 9.2 Critical
- ProductPHP
- ExploitationActively exploited (CISA KEV)
What happened
PHP stops a request with a jump when it runs out of memory. In some places the request memory is left uninitialized when that happens, and the cleanup step then reads it. That is CVE-2026-109618. The second flaw, CVE-2026-109619, is similar: some internal state keeps pointing at request memory after it has been freed, and the next request reads it.
Researchers showed that both conditions can be turned into remote code execution. PHP rates both 9.2 under CVSS 4.0; NVD rates them 9.8 and 8.1 under CVSS 3.1. CISA added both to its Known Exploited Vulnerabilities catalog on 26 October 2026, five days after the fix was released.
Who is affected
| PHP branch | Vulnerable | Recommended version |
|---|---|---|
| 8.2 | Before 8.2.35 | 8.2.36 or later |
| 8.3 | Before 8.3.36 | 8.3.37 or later |
| 8.4 | Before 8.4.27 | 8.4.28 or later |
| 8.5 | Before 8.5.12 | 8.5.13 or later |
| 8.1 and older | Yes, and no fix will come | Move to a supported branch |
The recommended versions are the November 2026 releases. They also fix six further critical flaws, so there is no reason to stop at the October versions.
Risk is highest with Apache and mod_php: the bug can trigger while PHP parses the request body, before any of your own code runs. FrankenPHP is likely affected in the same way. With PHP-FPM the flaw is reachable after request startup, but no complete exploit has been shown for it yet. Treat every setup as affected.
How to check your server
The PHP that serves your website can differ from the command-line PHP, so check both.
php -v
php-fpm -v # or php-fpm8.3 -v, depending on your distribution
php -i | grep -E 'memory_limit|upload_progress'On shared hosting you may not have a shell. Check the PHP version in your hosting panel, or in WordPress under Tools → Site Health → Info → Server.
How to fix it
- Upgrade to the recommended version for your branch, or to the latest version your distribution ships with the fix.
- Restart PHP-FPM, Apache or FrankenPHP so that no old worker keeps running.
- Confirm the new version with the commands above and through the web server, not only the command line.
- If you run PHP 8.1 or older, plan the move to 8.3 or 8.4 now. These branches will not get a fix.
If you cannot upgrade today
PHP says upgrading is the only complete fix. These settings reduce the risk until you can:
- For CVE-2026-109618: set a tight
post_max_size, do not cap memory with RLIMIT_AS, and block multipart requests at the web server or proxy if your site does not need file uploads. - For CVE-2026-109619: set
session.upload_progress.enabled=0, and on PHP 8.5 alsofatal_error_backtraces=0. - Restart every PHP worker after changing these settings.
What to look for
If your server ran a vulnerable version after 21 October 2026, check for signs of compromise: new or changed PHP files in upload and cache directories, unknown administrator accounts, unexpected cron jobs and outbound connections from the web server user. A WordPress security audit or Linux server audit includes these checks.
Questions
Does this affect WordPress?
WordPress runs on PHP, so a WordPress site on a vulnerable PHP version is exposed. Updating WordPress or plugins does not fix it; the PHP version itself must be upgraded.
My host manages PHP. Do I need to do anything?
Check the version in your hosting panel. Most managed hosts upgrade quickly, but some keep old branches available. If you selected PHP 8.1 or older yourself, switch to a supported branch.
Is a web application firewall enough?
No. A firewall may block some attempts, but the flaws sit in how PHP handles memory and can be reached with ordinary requests. Upgrade PHP.
This article is written for defenders and contains no exploit code. It reflects the vendor advisories on the date above; always check the vendor advisory for the latest fixed versions.
Not sure whether you are affected?
We check your servers and applications for this vulnerability and others like it, and give you a clear report with fixes.