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 24, 2026, 1:37 am UTC
Amazon reports broad exploitation attempts in the wild, though it says it is unclear whether the early attempts its honeypots caught would have worked on real systems. Cisco Talos also reports attempts, mostly scanning. CISA urged immediate patching on October 21. We read every vendor status on October 22, 2026, unless a line gives another date.
PHP2Shell is the name for two critical flaws in the PHP engine itself, CVE-2026-109618 and CVE-2026-109619. Any PHP installation that serves web requests is open to unauthenticated remote code execution, per the PHP security advisory, so treat every such server as exposed until it runs a fixed build and every worker has restarted. In the words of the FBI Cyber Division on October 21, the flaws "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. Start with internet facing Apache mod_php servers, the setup the PHP security team rates highest risk. Do not judge by php -v alone. Ubuntu, and Red Hat for older streams, ship the fix under old version numbers, so read the package changelog too. PHP 8.1 and older get no PHP release at all. On those, install a vendor backport. No backport? Then CISA advises taking the server offline until it is patched. After that, check for signs of compromise as far back as October 17, 2026.
Key Takeaways
- Patching the host does nothing for the PHP inside a container image. Rebuild and redeploy, and check whether your cloud platform patches PHP for you.
- On shared or managed hosting, get the fixed PHP build and its date in writing.
- Interim settings and WAF rules only buy time.
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. CVE-2026-109619 is a lifetime bug. Request state can outlive its freed memory, and a later request on the same worker may use it.
The worst outcome, confirmed in the PHP advisories, is unauthenticated remote code execution as the web worker account. The second flaw also discloses memory, and according to Wiz, one of the reporting teams, that alone could expose passwords, tokens and API keys with no code execution at all. Login checks will not save you. PHP processes the malicious request before any application code runs, so application level authentication cannot block the attack (Datadog security research, after reproducing both flaws).

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 December 31 of each year shown (PHP supported versions).
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 |
We would treat any PHP older than 8.2 as vulnerable unless your vendor says otherwise.
The CVE records from PHP formally cover only 8.2 to 8.5. Other sources go further back. Calif and Wiz, two of the reporting teams, trace affected code to PHP 5.4. NVD now flags releases back to 7.3 for CVE-2026-109618, and back to 5.4 for the other one. And the AWS security bulletin? It 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. We checked that on throwaway containers, along with the output each step describes. First the code blocks, on October 22, 2026. Then every command in this section, the code blocks included, on October 24.
Find the PHP that answers web requests
The command line PHP can differ from the PHP that serves your site. Check both. 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 Debian, Ubuntu and the RHEL family, a version below Table 1 with no match for either CVE ID means the fix is not installed, while 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 package version with Ubuntu USN-8948-1, the Debian tracker or Red Hat RHSB-2026-013. Amazon Linux 2023 works differently. Each host is locked to a repository release, so run sudo dnf check-release-update and move to a release that carries the fixed packages from the Amazon Linux advisories, which mark 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
A pinned tag such as 8.3.35 never picks up the fix. Rebuild from a fixed base and replace the running containers. The official php image has fixed 8.5.12, 8.4.27, 8.3.36 and 8.2.35 tags, and none for 8.1 or 7.4.
On managed or shared hosting, ask for the build
In WordPress, Tools > Site Health > Info > Server shows the PHP version. A backport will not show up there. On many hosts the version is set in the hosting control panel, so ask your host which PHP build serves the site and when it got the fix.
Restart, then check again
A running worker keeps the old code in memory until it restarts. So after the install, restart Apache, PHP-FPM and long running PHP workers (PHP2Shell disclosure site), then run systemctl status php8.3-fpm and check 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, while Debian 12, Debian 13 and Alpine 3.24 move to the upstream number. Older Alpine branches caught up as well, with fixed PHP packages on every supported branch by October 24. RHEL 9 PHP 8.4 still had no fix that day. NVD based scanners may still flag backported hosts. When one does, answer with the vendor advisory.
What to Patch First Across Your PHP Servers
Inventory comes first. List every system running PHP, including PHP bundled inside other software, and patch the internet facing ones before the rest (CISA alert), then work down Table 2, the order our cloud and DevOps team would follow on a mixed fleet. 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 expects PAN-OS hotfixes, which also cover Panorama, from October 26 to 30 (read October 24) |
Give the inventory and the restart checks to one person, usually the DevOps engineer who already sees every host and image, and have them report three numbers to the business. How many hosts are patched and restarted? How many are offline or on interim settings? How many show a sign from the checklist below?
PHP2Shell Mitigations If You Cannot Patch Today
Only an update fully fixes PHP2Shell.
The PHP advisory is explicit that the steps below do not make an installation safe, and if a system cannot be updated now, or still runs PHP 8.1 or older, the CISA position is to take it offline until it is 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, then restart every worker. Settings made throughini_set()or.user.inido not count. This blocks the confirmed session paths of CVE-2026-109619. Other variants stay open. - 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, and cap memory with a container or cgroup limit. SkipRLIMIT_ASandRLIMIT_DATA. Even then, an underlying allocation failure can still reach the flaw (PHP advisory), and an uncapped worker risks memory exhaustion (Calif). - 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, block it at the proxy, an option the CVE-2026-109618 advisory offers, but place a test order first, because some stores submit cart or checkout forms as multipart (Sansec). On PHP-FPM you can also set pm.max_requests=1 if performance is not a concern, per the CVE-2026-109619 advisory. Confirm each value in a request served by PHP-FPM. Once PHP is updated, put the memory limit back. Leave session upload progress off, though. On October 23, PHP suggested keeping it disabled until its next regular release, to block an unlikely related flaw, CVE-2026-115560.
Do not lean on a WAF here. One of the two flaws "is largely outside the reach of any web application firewall," according to AWS guidance on WAF rules, and requests sent straight to your origin skip an edge WAF anyway, 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, default version 2.4 or later, with rules for both CVEs | 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, expected to finish by October 28, off by default | Enable it in Block mode once available |
PHP2Shell on WordPress, WooCommerce and Headless Sites
Clicking Update in the WordPress dashboard will not touch this bug. It lives in PHP itself, so it reaches any server that hosts a PHP application. No WordPress update is required or planned (WordPress.org). WooCommerce runs on that same PHP, and Calif lists WordPress, Drupal and Magento among its demonstrated targets.
Going headless does not get you out of it. The storefront might be React or Next.js. The WordPress admin and REST API behind it still run on PHP, and that server needs the fix too.
So who updates PHP on your sites? It is a separate job from WordPress updates. Give it a named owner, whether that is your own team or WordPress developers you hire. Agencies, list every client site by host and PHP build. One forgotten VPS stays open. On GoDaddy managed WordPress hosting, PHP was patched with no customer action, while VPS customers update PHP themselves.
Signs a PHP Server Was Already Compromised
Look back to at least October 17, 2026, the day Amazon honeypots caught the first attempt. Patch every clean host now. A host that shows any sign below is a different job. Isolate it first. Before anyone patches or restarts it, copy its logs and take a disk snapshot. 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 from the Amazon report - 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, the result of a failed attempt in Datadog testing
- 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
Quiet logs do not clear a host.
A successful attack can return HTTP 200 and leave the worker running (Datadog), and per the PHP advisory a missing error is not proof of safety. We would cast a wide net on secrets. 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 had seen none. By October 22, Talos was reporting attempts, mostly scanning, and Amazon had changed its wording to broad exploitation attempts. 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 reports the out of memory flaw, OpenAI independently reports the same root cause, 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 |
| October 22 | Cisco Talos | Exploitation attempts within hours of disclosure, mostly scanning |
| October 22, 9:25 pm | Amazon | Changes its wording to broad exploitation attempts |
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 the free architecture and security review offered above. 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?
Attackers are trying. Amazon reports broad exploitation attempts in the wild, with a first attempt on October 17, 2026, but cannot yet say whether its early honeypot catches would have worked on real systems. Cisco Talos reports attempts too, mostly scanning. CISA, in its alert revised October 23, says it had not observed successful exploitation in the wild, and as of October 24, 1:37 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. A WAF can lower exposure while you patch. Per AWS, one flaw is largely beyond any WAF, and traffic sent straight to your origin skips an edge WAF anyway.
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. Under CVSS 3.1, NVD scores CVE-2026-109618 at 9.8 and CVE-2026-109619 at 8.1, and Red Hat rates both Important at 8.1. The gap is attack complexity, which NVD scores low only for the first flaw, while Red Hat, like PHP, scores it high for both. The 10.0 in leaked posts was wrong, according to the PHP Foundation.








