What Is PHP2Shell? How to Patch Websites and Network Devices

PHP fixed two critical remote code execution flaws on October 21, 2026, and CISA has confirmed they are being exploited. Here is how site owners and network admins can check they are patched.
Key Takeaways
- On October 21, 2026, PHP released versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two critical flaws that allow remote code execution without logging in.
- The two flaws, CVE-2026-109618 and CVE-2026-109619, are known as PHP2Shell, and both are rated 9.2 under CVSS v4.0.
- The PHP project says every PHP installation that serves web requests is at risk, with Apache's mod_php at the highest risk.
- The US Cybersecurity and Infrastructure Security Agency (CISA) added both flaws to its Known Exploited Vulnerabilities (KEV) catalog on October 26, 2026.
- The PHP project stresses that temporary configuration changes are not a full fix and that "updating is the only safe choice."
PHP2Shell is a pair of critical PHP vulnerabilities disclosed in October 2026. Site builders such as WordPress run on PHP, so this is not just a job for engineers: small businesses running an online shop on WordPress and bloggers with their own sites also need to make sure their server has been updated. This guide sums up what the PHP project, Taiwan's Administration for Cyber Security (ACS) under the Ministry of Digital Affairs and US CISA have confirmed, and what website and device administrators can do.
What Is the PHP2Shell Vulnerability?
PHP2Shell refers to two critical flaws in PHP itself. Without logging in, an attacker may be able to run arbitrary code on the server through a web request, which effectively hands over control of the host.
PHP is a programming language that runs on the server and builds the page when a visitor opens a website. In its October 22 press release, Taiwan's ACS noted that WordPress, Drupal, Joomla and Magento are all built on PHP, and that some software that does not advertise PHP also runs on it internally.
Of the two flaws, CVE-2026-109618 involves how PHP handles running out of memory, and CVE-2026-109619 involves stale global state. CVSS is the standard international scale for rating vulnerability severity, with a maximum of 10, and both flaws scored 9.2. "PHP2Shell" is the name used by Taiwan's ACS and CISA; the PHP project's own notice simply lists the CVE numbers.
| Date (2026) | Organization | What happened |
|---|---|---|
| October 21 | PHP project | Released the fixed versions at 10 p.m. Taiwan time; CISA issued an alert the same day |
| October 22 | Taiwan's ACS | Urged government agencies, schools and businesses to check their versions and update quickly |
| October 26 | US CISA | Added both flaws to the KEV catalog |
| October 29 | Taiwan's ACS | Responding to claims that network devices were affected, urged closing external access to management interfaces |
Which Websites and Systems Are Affected?
The PHP project says any PHP installation that serves web requests is at risk, including all the common setups, and it considers the risk highest for Apache's mod_php.
The setups the PHP project lists include PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed; most site owners do not need to tell them apart. The PHP project notes that mod_php has a demonstrated exploit in which a request from someone who is not logged in can trigger the attack before any site code runs. So even if WordPress and every plugin are up to date, the risk remains until PHP itself is updated. WordPress also explained on October 21 that this is not a WordPress-specific problem and that no WordPress update is required or planned.
| Release line | Fixed version | Official support status |
|---|---|---|
| PHP 8.5 | 8.5.12 or later | Still receiving updates |
| PHP 8.4 | 8.4.27 or later | Still receiving updates |
| PHP 8.3 | 8.3.36 or later | Security fixes only, until December 31, 2027 |
| PHP 8.2 | 8.2.35 or later | No security fixes after December 31, 2026 |
| PHP 8.1 and older | No longer updated by PHP | Check with your distribution or LTS vendor, or upgrade |

Using WordPress or a Site Builder? How to Check You Are Patched
First, work out whether you host the site yourself or rent hosting. With rented hosting or a site-building platform, the provider usually updates PHP, so asking them is fastest. If you run your own server, you need to check the version and install the update yourself.
- Check your PHP version: WordPress suggests going to Tools → Site Health → Info → Server in the dashboard. Many hosting control panels show it too.
- Compare with the fixed versions: You are patched only if your version is the same as or newer than the one in the table above. If PHP came from a Linux distribution's packages, the PHP project says distributions received the fixes in advance, so follow your distribution's notice.
- Renting hosting? Ask your provider: Ask whether PHP has been updated to a version that fixes both CVEs. WordPress notes that hosts may already be patching and adding firewall rules, but you should still confirm.
- Running your own server? Update it: Install the update the way your operating system or vendor provides, then restart the PHP services so the new version takes effect.
- Check your logs afterwards: Taiwan's ACS recommends reviewing system logs and unusual access records after patching. If you find suspicious activity, check that accounts and credentials are secure, for example by changing your admin and database passwords and turning on two-step verification for your admin account.
Can Temporary Configuration Changes Replace the Update?
No. The PHP project lists a few temporary settings, but it says plainly that they only reduce exposure to specific attack paths and do not make a server safe: "updating is the only safe choice."
These stopgaps include adjusting memory_limit, lowering post_max_size and turning off session.upload_progress.enabled. They must go in php.ini, the FPM configuration or server-level configuration, followed by a restart, and the PHP project warns that some of them cannot be applied with ini_set() or .user.ini, so site owners on rented hosting usually cannot use them.
CISA's advice goes further: inventory every system that runs PHP, including PHP embedded in other software; patch internet-facing systems first; and take systems offline until they are patched or upgraded if they cannot be updated right away or still run PHP 8.1 or older.

Are Network Devices Affected Too?
Some are. Taiwan's ACS said on October 29 that several IT and OT manufacturers have confirmed affected products, and that some firewalls and network devices use PHP as a component of their management interface.
OT, or operational technology, refers to systems that control physical equipment in places such as factories and power facilities. The press release responded to claims by Israeli security firm Dream Security. According to the company, 25 firewalls and network devices in the US, Japan, South Korea and Taiwan were suspected of being breached through the PHP flaws; this figure did not come from an ACS investigation.
The ACS and Taiwan's National Institute of Cyber Security made a preliminary assessment that these devices' management interfaces are usually not open to the internet, and that attack code generally has to be tailored to each device version, making mass attacks difficult. Devices whose management interface is exposed to the internet and still unpatched, however, remain at risk of intrusion. The ACS recommends that organizations:
- Check whether the management interfaces of firewalls and network devices are exposed to the internet, and close external access.
- Follow the manufacturer's update notices, take stock of all relevant devices and patch them as soon as possible.
The press release did not name any device brand. Whether your device is affected depends on the manufacturer's own notice.
What Should You Do? A Quick Guide by Role
| Who you are | What to do first |
|---|---|
| Small business or blogger on rented hosting or a site builder | Ask your host whether PHP has been updated; no need to wait for a WordPress update |
| Site owner or engineer running your own server | Update to a fixed version or later, restart services and check logs |
| Still on PHP 8.1 or older | Ask your vendor about fixes, otherwise upgrade soon, and take the system offline if needed |
| IT staff managing firewalls and network devices | Close external access to management interfaces, follow manufacturer notices and update |

Around the same time, Synology also urged NAS users to update their systems; see Synology NAS ransomware attacks. AI is also getting better at finding vulnerabilities, as covered in What is Gemini 4 Carbon. It is best not to put off update notifications.
This situation is still developing. For affected products and how to fix them, rely on official notices from the PHP project, Taiwan's ACS and each device manufacturer.
Frequently Asked Questions
Will updating WordPress and plugins fix PHP2Shell?
No. WordPress explained on October 21 that these two flaws are not specific to WordPress and that no WordPress update is required or planned. What needs updating is the PHP on your server.
Is PHP2Shell already being exploited?
US CISA added both flaws to its Known Exploited Vulnerabilities catalog on October 26, 2026. The catalog lists vulnerabilities confirmed to have been exploited in the real world, so you should update as soon as possible rather than wait.
My site still runs PHP 8.1. What should I do?
The PHP project no longer updates 8.1 and older. Ask your Linux distribution or LTS vendor whether a fix is available; otherwise upgrade soon. CISA also says systems that cannot be updated should be taken offline.
When does support for PHP 8.2 end?
The PHP project says PHP 8.2 reaches end of life on December 31, 2026 and will get no security fixes after that. Update to 8.2.35 now, and plan an upgrade to a newer release as well.
Sources: PHP security advisory (2026), US CISA alert on critical PHP vulnerabilities (2026), Taiwan Administration for Cyber Security press release on the PHP emergency update (in Chinese, 2026), Taiwan Administration for Cyber Security press release on network devices and the PHP flaws (in Chinese, 2026)