PHP2SHELL: Critical PHP RCE
-256ea8577415b99bfccc89e9927acb99.png)
TLDR;
PHP2Shell refers to two reported critical Remote Code Execution (RCE) vulnerabilities, CVE-2026-109618 and CVE-2026-109619, with a reported CVSS v4.0 score of 9.2/10. PHP is used by approximately 69.3% of websites whose server-side programming language is known, according to W3Techs. Successful exploitation could allow attackers to execute commands remotely with the privileges of the affected user running that process. This may expose sensitive data or enable further system compromise.
The PHP security team announced an upcoming security release. Administrators should identify PHP installations and monitor the official advisory for confirmed affected or fixed versions. Make sure to apply security updates as soon as they are available, and investigate malicious activity. Also updating a CMS or its plugins alone may not fix a vulnerability in the underlying PHP runtime.
Timeline
| Date | Event |
|---|---|
| October 21, 2026 @ 2:20 AM AEDT | A Hacker News post reports two upcoming PHP RCE disclosures |
| October 21, 2026 after 2:20 AM AEDT | PHP announces an emergency/critical security release following early leaks confirmed by security researchers at watchTowr |
| October 21, 2026 | Cloudflare released new WAF rules |
| October 22, 2026 @ 1:00 AM AEDT | PHP team will release patch for CVE-2026-109618 and CVE-2026-109619 across supported branches. |
Background
About PHP
- PHP was first released publicly in June 1995. As of October 2026, that makes it approximately 31 years old from its initial creation.
- As per w3techs PHP is used by 69.3% of all the websites whose server-side programming language we know. Out of this 65.2% use PHPv8, 27% use PHPv7 and 7.7% use PHPv5

- Few sites that use PHP according to w3techs include - Microsoft.com (used on subdomain), Wikipedia.org, Digicert.com (used on inner pages), Wordpress.org, Archive.org (used on subdomain), Baidu.com (used on subdomain), Nginx.org (used on subdomain), Theguardian.com (used on subdomain), Mit.edu (used on subdomain), Mozilla.org (used on subdomain), Speedtest.net (used on inner pages), Rakuten.com (used on subdomain), Snaptik.app, Videeyss.shop, Ubuntu.com (used on inner pages) and more
- Above stats shows the popularity of this language and also gives an idea about the impact any vulnerability impose specially if it is RCE.
What is RCE?
- Remote Code Execution (RCE) is a vulnerability that allows an attacker to execute code on a target system remotely, potentially gaining access to the machine with the privileges of the account running the code. For example, an attacker may be able to list, view, modify, create, or download files, move laterally across the network, and attempt to escalate privileges to administrator level, potentially gaining full control of the machine.
What is PHP2SHELL?
- PHP2Shell is a high-severity security threat involving two critical Remote Code Execution (RCE) flaws in PHP, tracked as CVE-2026-109618 and CVE-2026-109619 with rating 9.2 on the CVSS v4.0 scale out of 10.
- Sansec expected mass attacks within 15 minutes of the release.
- All PHP versions from PHP 5 onwards may be affected.(cyber.gov.au)
Strategic Precautions
1. Disable Upload Progress Tracking
- Turn off upload progress in
php.inifile.
session.upload_progress.enabled = Off
- Restart the
php-fpmservice and make sure it is turned off. - Note: As per GMO Flatt Security Blog - "The vulnerability is considered a memory-destroying bug. The vulnerability appears to be related to session management, according to our research. The setting alone is only mitigation, and the attack itself is not expected to be avoided" -
2. Reduce Network Exposure
- Cloudflare released emergency WAF rules to detect or block anomalous request patterns - cloudflare.com (These rules may provide an additional defensive layer, but they should not be treated as a substitute for patching PHP)
- Set up
iptablerules to block unwanted traffic
# for local traffic like DB
sudo iptables -A INPUT -i lo -j ACCEPT
# for established connections
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# if ssh required
sudo iptables -A INPUT -p tcp -s YOUR_TRUSTED_IP --dport 22 -j ACCEPT
# for incoming traffic to PHP webapp
sudo iptables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
# drop other traffic
sudo iptables -P INPUT DROP
- Firewall rules may differ based on services running on specific ports and system architecture
- Note: These rules do not patch PHP or guarantee protection as attacker can still access the vulnerable PHP app however it reduces the attack surface
3. Set up custom WAF, IDS and IPS rules
- Use ModSecurity with OWASP Core Rule Set to help detect and block suspicious HTTP requests.
- Detection rules should be tested against the relevant attack patterns and request encodings. Poorly designed rules may be bypassed, so WAF, IDS, and IPS controls should be treated as additional defensive layers rather than replacements for patching.
4. Remove write access
- Give only admin or very trusted user access to write and disable write access to default user on with web service is running until patch release.
# make root user and www-data group to access files
sudo chown -R root:www-data /var/www/html
# remove write access for group and other users
sudo chmod -R go-w /var/www/html
- Note: The recursive ownership change could break applications that need writable directories.
5. The ultimate solution 💀
- Gina Peter Banyard (PHP core developer) said "If you can afford turning off a server for a day, that might be the most sensible thing to do. But that is far from a reasonable thing to demand for most people."- phpc.social.
Mitigation
- Because this flaw resides at the infrastructure layer, you cannot fix PHP2Shell inside your website's codebase or CMS admin panel (like WordPress or Magento) - Sansec
- Gina Peter Banyard (PHP core developer) said - "The only thing I can say is that the only mitigation is patching / upgrading PHP" - phpc.social
- The PHP security team scheduled an emergency patch release for October 22, 2026, at 1 AM AEDT - php.net
- Cyber.gov.au advises to
- Identify PHP within their environments.
- Monitor and review PHP official guidance at PHP Security Release
- Prepare to update and apply security patches as they become available.
- Monitor PHP applications and associated environments for potentially malicious activity.
QNA
- Has exploitation been confirmed in the wild??
- As of 21 Oct 2026, Australian Cyber Security Centre reported that it was not aware of active exploitation.
- Below X post is gaining traction claiming the POC here however people claim it is a fake POC.


-
Why does it matter if I don't use PHP?
- Even if you don't directly use PHP, your website may rely on a CMS or other application that runs on PHP. For example, WordPress and Magento require PHP to operate. If your hosting environment uses an affected PHP version, your website may still be at risk. Check your server's PHP version and apply the relevant security patches. Updating your CMS or its plugins alone may not fix a vulnerability in the underlying PHP installation.
-
Are we cooked?
- maybe 💀
