PHP2Shell (CVE-2026-109618 and CVE-2026-109619), How to Check and Patch Your PHP Servers

Saurav Jagdale
Technical Lead, Unico Connect
In this article
- Quick Answer
- Key Takeaways
- What PHP2Shell Is and Why Application Code Cannot Stop It
- Which PHP Versions Fix CVE-2026-109618 and CVE-2026-109619
- Is My PHP Version Vulnerable, a 10 Minute Check
- What to Patch First Across Your PHP Servers
- PHP2Shell Mitigations If You Cannot Patch Today
- PHP2Shell on WordPress, WooCommerce and Headless Sites
- Signs a PHP Server Was Already Compromised
- CVE-2026-109618 Exploitation Reports and Timeline
- Help With a PHP2Shell Response
- Frequently Asked Questions
Updated October 22, 2026, 9 am UTC
Amazon reports broad exploitation in the wild. CISA urged immediate patching on October 21 but had not added either CVE to its Known Exploited Vulnerabilities catalog as of this update. Vendor statuses were read October 22, 2026, unless dated otherwise.
PHP2Shell is the name for two critical flaws in the PHP engine itself, CVE-2026-109618 and CVE-2026-109619. The PHP security team says they can allow unauthenticated remote code execution on any PHP installation that serves web requests, and the FBI Cyber Division warned on October 21 that they "could allow malicious cyber actors to remotely execute code in PHP core."
Quick Answer
Update every PHP runtime that serves web traffic to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or to a vendor package that lists both CVEs, then restart every PHP worker. Patch internet facing Apache mod_php servers first, which the PHP security team rates highest risk. Ubuntu, and Red Hat for older streams, ship the fix under old version numbers, so check the package changelog as well as php -v. PHP 8.1 and older get no PHP release, so install a vendor backport or, as CISA advises, take the server offline until it is patched. Then look for signs of compromise from October 17, 2026.
Key Takeaways
- Containers need a rebuild, since host updates never reach the PHP in an image, and cloud platforms differ on who updates PHP.
- On shared or managed hosting, get the fixed PHP build and its date in writing.
- Settings and WAF rules cut exposure, but only an update is a complete fix.
What PHP2Shell Is and Why Application Code Cannot Stop It
PHP2Shell is a PHP vulnerability made of two bugs in how PHP starts and cleans up each request. In CVE-2026-109618, out of memory handling can interrupt PHP while request data is only partly initialized, and cleanup may then treat the invalid data as valid. In CVE-2026-109619, request state can outlive its freed memory, and a later request on the same worker may use it. The PHP security team confirms unauthenticated remote code execution as the web worker account, plus memory disclosure for the second flaw. Wiz, one of the reporting teams, says that could expose passwords, tokens and API keys without code execution.
Datadog reproduced both flaws and found that application level authentication cannot block an attack, because PHP processes the malicious request before any application code runs.

9.2
CVSS v4.0 score from the PHP security team for both CVEs
PHP advisories, October 21, 2026
26.9%
of websites that use PHP run PHP 7, which gets no PHP release for this fix
W3Techs, read October 22, 2026
Which PHP Versions Fix CVE-2026-109618 and CVE-2026-109619
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix both flaws. Support ends on December 31 of each year shown, per the PHP supported versions page.
Table 1. Fixed PHP releases by branch, read October 22, 2026
| PHP branch | Fixed release | PHP project support | What to do |
|---|---|---|---|
| 8.5 | 8.5.12 | Active until 2027, security fixes until 2029 | Update to 8.5.12 or a vendor build listing both CVEs |
| 8.4 | 8.4.27 | Active until 2026, security fixes until 2028 | Update to 8.4.27 or a vendor build listing both CVEs |
| 8.3 | 8.3.36 | Security fixes only, until 2027 | Update to 8.3.36, which contains only this fix |
| 8.2 | 8.2.35 | Security fixes only, until 2026 | Update to 8.2.35, which contains only this fix, then plan a move to 8.4 or 8.5 |
| 8.1, 8.0 and 7.4 | None. The PHP security team published minimal source backports | End of life | Use a vendor backport, a source backport as a stopgap, or go offline |
| 7.3 and older | None. Ubuntu Pro fixes 7.2, plus 7.0 and 5.5 with Legacy Support. cPanel servers on CloudLinux get fixed ea-php52 to ea-php85 | End of life | Use a vendor fix, upgrade, or go offline |
The CVE records from PHP formally list only 8.2 to 8.5, but Calif and Wiz, two of the reporting teams, trace affected code back to PHP 5.4, and NVD flags every release before 8.2.35. Treat any older PHP as vulnerable unless your vendor says otherwise. The AWS security bulletin also lists PHP 5.4 to 8.1 with no upstream fix released.
Is My PHP Version Vulnerable, a 10 Minute Check
Your PHP is patched only if the runtime that answers web requests runs a Table 1 release or a vendor package naming both CVE IDs. Every command below only reads.
Find the PHP that answers web requests
The command line PHP can differ from the PHP that serves your site. Any php module in the Apache list means mod_php.
php -v
# Debian and Ubuntu, use your branch
/usr/sbin/php-fpm8.3 -v
sudo apache2ctl -M | grep -i php
# RHEL family and Amazon Linux
/usr/sbin/php-fpm -v
sudo httpd -M | grep -i php
Read the package changelog as well as the version
On a version below Table 1, no match for either CVE ID means the fix is not installed. Alpine and the official image show the upstream number instead.
# Debian and Ubuntu, use your branch
dpkg-query -W 'php*-fpm' 'libapache2-mod-php*'
zgrep 'CVE-2026-10961[89]' /usr/share/doc/php8.3-common/changelog.Debian.gz
# RHEL family
rpm -q --changelog php-fpm | grep 'CVE-2026-10961[89]'
Compare the version with Ubuntu USN-8948-1, the Debian tracker or Red Hat RHSB-2026-013. Amazon Linux 2023 locks each host to a repository release, so run sudo dnf check-release-update and move to a release with the fixed packages from the Amazon Linux advisories, which list Amazon Linux 2 php and AL2023 php8.1 as No Fix Planned.
List the PHP inside your containers
docker ps --format '{{.Names}} {{.Image}}'
docker exec CONTAINER_NAME php -v
The official php image has fixed 8.5.12, 8.4.27, 8.3.36 and 8.2.35 tags but none for 8.1 or 7.4. Rebuild from a fixed base and replace the running containers, since a pinned tag such as 8.3.35 never picks up the fix.
On managed or shared hosting, ask for the build
In WordPress, Tools > Site Health > Info > Server shows the PHP version, which cannot reveal a backport. On many hosts the version is set in the hosting control panel, not in WordPress, so ask your host which PHP build serves the site and when it got the fix.
Restart, then check again
The PHP2Shell disclosure site says to restart Apache, PHP-FPM and long running PHP workers after the install. Then confirm with systemctl status php8.3-fpm that each service started after the update.
An old version number can still be patched
Ubuntu 24.04 still prints PHP 8.3.6 from package 8.3.6-0ubuntu0.24.04.13, Ubuntu 22.04 prints a patched 8.1.2-1ubuntu2.28, and RHEL 9 prints PHP 8.0.30 from php-fpm 8.0.30-8.el9_8.1. Debian 12, Debian 13 and Alpine 3.24 move to the upstream number. On October 22, older Alpine branches still lacked some fixed packages and RHEL 9 PHP 8.4 had no fix. NVD based scanners may still flag backported hosts, so answer with the vendor advisory.
What to Patch First Across Your PHP Servers
CISA tells organizations to inventory every system running PHP, including PHP bundled inside other software, and to patch internet facing systems first. Finish rows 1 and 2 before anything else.
Table 2. Patch order for a mixed PHP fleet, read October 22, 2026
| Order | Where PHP runs | Why it ranks here | What to do |
|---|---|---|---|
| 1 | Internet facing Apache with mod_php | Rated highest risk by the PHP security team, with a demonstrated unauthenticated exploit | Patch now and restart Apache |
| 2 | Internet facing PHP-FPM, FrankenPHP, LiteSpeed and php-cgi | All named at risk, and the advisory reports a validated FPM attack for CVE-2026-109619 | Patch and restart every worker |
| 3 | Containers and cloud platforms | Host updates never reach the PHP in an image | Rebuild and redeploy unless the platform updates PHP for you, as Google does for App Engine standard on 8.2 and newer. Elastic Beanstalk needs PHP platform v4.13.13, since v4.13.12 still ran unpatched PHP, and per AWS, Lightsail needs new instances from updated blueprints |
| 4 | Shared hosting and managed WordPress | The host patches the runtime | Get the fixed build and date in writing. cPanel EasyApache 4 fixes ea-php74 to ea-php85, and Plesk for Linux builds of 7.4.33, 8.0.30 and 8.1.34 from October 21 carry the fix |
| 5 | Internal tools, private staging and CLI workers | Closed to the internet or not serving web requests | Update in the same window. Public staging and preview sites belong in rows 1 and 2 |
| 6 | Appliances and products that bundle PHP | Only the vendor can patch them | Track vendor advisories. Palo Alto lists PAN-OS and Panorama as affected, with no fix date yet |
Give one person, usually the DevOps engineer who sees every host and image, the inventory and restart checks. That person gives the business three counts, hosts patched and restarted, hosts offline or on interim settings, and hosts showing a sign from the checklist below.
PHP2Shell Mitigations If You Cannot Patch Today
Only the update fully fixes PHP2Shell. CISA says systems that cannot be updated now, or that run PHP 8.1 or older, should go offline until patched.
Interim settings from the PHP advisory, partial protection only
- Set
session.upload_progress.enabled=0in php.ini, the FPM pool or server configuration that applies before request parsing, never throughini_set()or.user.ini, then restart every worker. This blocks the confirmed session paths of CVE-2026-109619 but not other variants. - On PHP 8.5, also set
fatal_error_backtraces=0and restart, which blocks only the confirmed fatal backtrace path. - Set
memory_limit=-1throughphp_admin_valueso apps cannot override it, with a container or cgroup memory limit, neverRLIMIT_ASorRLIMIT_DATA. PHP notes an underlying allocation failure can still reach the flaw, and Calif warns an uncapped worker risks memory exhaustion. - Keep
post_max_sizeat 8M without uploads or 32M with them, andupload_max_filesizebelow it. - Remove invalid or deprecated per request settings that print warnings before PHP initializes. Hiding them with
display_errorsor@does not help.
If the app takes no multipart form data, the CVE-2026-109618 advisory suggests blocking it at the proxy, but Sansec warns that some checkouts post as multipart, so test first. Sansec also says to confirm each value in a request served by PHP-FPM and to restore the memory limit after you update. For PHP-FPM, the CVE-2026-109619 advisory adds pm.max_requests=1 if performance is not a concern.
AWS warns that one of the two flaws "is largely outside the reach of any web application firewall," and requests sent straight to your origin skip an edge WAF, so close the origin to direct traffic.
Table 3. What WAF vendors say they cover, read October 22, 2026
| WAF | What the vendor says | What to do |
|---|---|---|
| Cloudflare | Rules live since October 21, 3 am UTC, on every plan with WAF, Free included | On a paid plan, confirm the rules are in block mode |
| AWS WAF | PHP managed rule group version 2.3 for CVE-2026-109619, a body size rule for CVE-2026-109618 | Test in count mode, then block |
| Google Cloud Armor | Managed rules updated | Enable the File Upload and remote file inclusion (RFI) categories |
| Azure Front Door WAF | Rule 99006001 rolling out until October 28, off by default | Enable it in Block mode once available |
PHP2Shell on WordPress, WooCommerce and Headless Sites
A WordPress or WooCommerce site is exposed through the PHP underneath it, and Calif lists demonstrated attacks on WordPress, Drupal and Magento. WordPress.org confirms that the flaws affect any server that hosts a PHP application and that no WordPress update is required or planned. On a headless build the storefront may run on React or Next.js, but the WordPress admin and REST API still run on PHP, so that server needs the fix too.
Whoever keeps core, themes and plugins updated, your own team or WordPress developers you hire, still has to update PHP separately. Agencies should list every client site by host and PHP build, since one forgotten VPS stays open. GoDaddy patched PHP on its managed WordPress hosting, but VPS customers update PHP themselves.
Signs a PHP Server Was Already Compromised
Amazon advises looking back to October 17, 2026, when its honeypots saw the first attempt. Patch every host now, but isolate any host that shows a sign below, copy its logs and take a disk snapshot before you patch or restart it, then rebuild it from a clean image.
- PHP workers launching shells or downloading tools, the activity CISA says to watch
- POST requests carrying the
PHP_SESSION_UPLOAD_PROGRESSfield in form uploads, a signal Amazon lists - Memory exhaustion errors ending in
in Unknown on line 0, which Datadog says means PHP failed before any script ran, though memory exhaustion alone does not prove an attack - Worker segmentation faults, which Datadog saw when an attempt failed
- Oversized or malformed PHPSESSID response cookies and unexplained worker crashes or restarts, per the disclosure site
- IP addresses from the Amazon report, to investigate rather than block since some are shared anonymization services
- New .php files in upload, cache or temp folders, unknown WordPress admins and new outbound connections from web servers
Datadog found that a successful attack can return HTTP 200 and leave the worker running, and the PHP advisory says a missing error is not proof of safety. So rotate the database passwords, API keys and session secrets the PHP worker could read, on any host with a match and on every internet facing host that ran unpatched PHP since October 17, because memory disclosure can leak them without code execution.
CVE-2026-109618 Exploitation Reports and Timeline
Amazon reported broad exploitation late on October 21, the same day Cisco Talos and CISA reported none. Times are UTC unless marked.
Table 4. PHP2Shell timeline, with who reported exploitation and when
| When | Source | What it reported |
|---|---|---|
| August 11, 2026 | PHP Foundation | Calif and OpenAI report the out of memory flaw, and Wiz reports more attack vectors on August 24 |
| October 17 | Amazon | First exploitation attempt in its honeypots, four days before disclosure |
| October 20, about 3 pm | PHP Foundation | CVE IDs leak with a wrong release time and a wrong CVSS score of 10.0, without technical details |
| October 21, 3 am | Cloudflare | WAF rules go live, and Cloudflare reports attack traffic against its customers |
| October 21, before 2 pm | PHP | Fixed releases and both advisories published |
| October 21, 2 pm | Cisco Talos | No exploitation seen in the wild yet |
| October 21 | CISA | Alert urges immediate patching, no exploitation observed at publication |
| October 21, after 10 pm | Amazon | PHP2Shell now broadly exploited in the wild |
Help With a PHP2Shell Response
Unico Connect builds WordPress and WooCommerce sites, and our cloud and DevOps team helps you inventory your PHP runtimes, confirm which carry the fix and patch the rest, starting with a free architecture and security review. It covers 1 to 2 business days of work from our team, and we share the initial findings with you. If you need a deeper audit, it is paid, and its scope depends on the scale of the project.
Frequently Asked Questions
Is PHP2Shell being exploited in the wild?
Yes, according to Amazon, which reported broad exploitation on October 21, 2026 and a first attempt on October 17. CISA said on October 21 that it had not observed exploitation, and as of October 22, 9 am UTC, neither CVE is in its Known Exploited Vulnerabilities catalog.
Does a WordPress update or security plugin protect against PHP2Shell?
No. A security plugin is WordPress code, and PHP handles the malicious request before WordPress or any plugin loads, so neither a plugin nor a core update fixes it.
Is my server patched if the PHP version number did not change?
It can be. Ubuntu, and Red Hat for older streams, add the fix to existing packages, so php -v can still show 8.3.6 on Ubuntu 24.04 or 8.0.30 on RHEL 9. Search the package changelog for both CVE IDs or match the package version to the vendor notice.
What if we still run PHP 7.4, 8.0 or 8.1?
Install a vendor backported package if one exists. Ubuntu, Red Hat, cPanel, CloudLinux and Plesk ship them for some of these branches, while the PHP project offers only minimal source backports. CISA advises taking PHP 8.1 and older systems offline until they are patched or updated. Then upgrade to 8.4 or 8.5, which keep security support until 2028 and 2029.
Can a WAF stop PHP2Shell?
No, it only reduces exposure while you patch. AWS says one flaw is largely beyond any WAF, and traffic sent straight to your origin skips an edge WAF.
Is the PHP2Shell CVSS score 9.2, 9.8 or 10?
The official score is 9.2 under CVSS v4.0, set by the PHP security team that issued both CVEs. NVD scores them 9.8 under CVSS 3.1, and Red Hat rates them Important, 8.1 under CVSS 3.1. The gap between NVD and Red Hat is attack complexity, which NVD scores low and Red Hat, like PHP, scores high. The 10.0 in leaked posts was wrong, according to the PHP Foundation.







