Quick answer: PHP2Shell is a pair of critical bugs in PHP, the language behind most websites, including WordPress, Joomla, Drupal and Magento sites. An attacker can run their own code on an unpatched server without logging in. The fix is to update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (released 21 October 2026) and restart PHP. If your site runs PHP 8.1 or older, upgrade or ask your host for a patched build today.
This post was written on 22 October 2026, the day after the fix was released. The story is still developing, so check php.net and your hosting provider for the latest.
What is the PHP2Shell bug?
PHP2Shell (often searched as the "PHP shell bug") is the name given to two vulnerabilities in PHP itself, not in a single plugin or theme:
| CVE-2026-109618 | CVE-2026-109619 | |
|---|---|---|
| What goes wrong | PHP runs out of memory while reading a request, leaves the data half-built, then trusts it | Data left over from one request points to freed memory, and a later request uses it |
| Login needed? | No | No |
| How it's attacked | A specially crafted web request | A specially crafted web request, often involving uploads |
| Severity (PHP's rating) | Critical, CVSS 9.2 | Critical, CVSS 9.2 |
In plain terms: someone anywhere on the internet can send a carefully built request to your website and take control of the server running it. Your site's own login page or password doesn't help, because the attack happens before your website's code even starts.
The bugs were found by researchers at Calif (as part of OpenAI's "Patch the Planet" project) and, independently, by the security firm Wiz. Wiz called them among the most severe flaws in PHP, "arguably in software history".
Is my website affected?
If your website runs on PHP and hasn't been updated since 21 October 2026, assume it is. The affected code goes back as far as PHP 5.4, so nearly every PHP site in use today is in scope.
PHP powers roughly 69% of websites whose server-side language is known (W3Techs, via Tenable). That includes:
- WordPress websites and WooCommerce stores
- Joomla, Drupal, Magento, OpenCart and PrestaShop sites
- Most sites on shared hosting with cPanel or Plesk
- Custom PHP and Laravel / CodeIgniter applications, school and college portals, and older business software with a web login
Every common way of running PHP on a web server is affected: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP rates the risk highest for Apache with mod_php.
Researchers have confirmed working attacks against specific versions of WordPress, Drupal, Joomla and Magento.
Not sure what your site runs on? If someone built your website on WordPress or with a hosting panel like cPanel, it almost certainly uses PHP. Ask your developer or hosting provider. It takes them a minute to check.
Is it being exploited?
Yes. Attackers are already trying:
- Amazon threat intelligence recorded an exploitation attempt on 17 October 2026, four days before the bugs were made public. Since then it reports PHP2Shell "is now being broadly exploited in the wild".
- Cloudflare reported early attack traffic, including attempts to get around its protections.
- watchTowr and Patchstack report exploitation attempts and broad, untargeted scanning of the internet.
"Untargeted" is the important word. Attackers don't pick businesses by size or fame. Automated tools scan every website they can reach and attack the ones that haven't updated. A small shop or school website in Latur is as likely to be hit as a big brand.
Some governments took services offline as a precaution while they patched, and the UK's NCSC advised taking offline any system that can't be fixed right away.
How to fix PHP2Shell
Step 1: Update PHP to a fixed version
| Your PHP version | Update to | Notes |
|---|---|---|
| 8.5.x | 8.5.12 or later | |
| 8.4.x | 8.4.27 or later | |
| 8.3.x | 8.3.36 or later | |
| 8.2.x | 8.2.35 or later | |
| 8.1, 8.0, 7.4 | Move to a supported version (8.3 or newer) | End of life. PHP published source-only fixes, with no official builds. Some Linux distributions and LTS vendors offer patched packages |
| 7.3 and older | Upgrade urgently | No fix from the PHP project |
On shared hosting (cPanel, Plesk, hPanel and similar): open your hosting panel's PHP version setting and check which version your site uses. Hosts generally update PHP on their own servers, but if your site is pinned to an old version such as 7.4 or 8.1, you have to switch it yourself. Test the site after switching, because very old themes and plugins sometimes break on newer PHP. If you're unsure, contact your host's support and ask: "Is my PHP patched for CVE-2026-109618 and CVE-2026-109619?"
On a VPS or your own server: install your operating system's PHP security update, or build the fixed release from php.net.
Careful: Linux distributions often patch PHP without changing the version number. Check your vendor's security notice rather than relying on the number alone. The
php -vcommand also shows the command-line PHP, which can be a different installation from the one serving your website.
Step 2: Restart PHP
Updating the files isn't enough. Old PHP workers keep running the vulnerable code until they're replaced. Restart PHP-FPM, Apache or LiteSpeed, rebuild and redeploy any Docker images, and confirm no workers are still on the old build. Changing the PHP version in a hosting panel normally takes care of this for you.
Step 3: Check that the fix is live
Ask your developer to confirm the PHP version the website reports, not just the server's command line. Security scanners such as Nessus (plugin 369483) and Qualys also detect PHP2Shell.
Step 4: Look for signs you were attacked before patching
Attacks started before the public announcement, so Amazon recommends looking back to 17 October 2026, not just from the day you patched. Signs to look for:
- Unusually large form submissions in your web server logs
- PHP "Allowed memory size … exhausted" errors, or worker "Segmentation fault" crashes
- A web server process launching a shell or system commands
- New or changed
.phpfiles you didn't add, especially in upload folders. Attackers often leave behind a web shell, a small hidden PHP file that lets them return later - New admin users in WordPress or your CMS, spam pages, or redirects to strange sites
A successful attack doesn't necessarily crash anything or show an error, so a quiet log doesn't prove the site is safe. If you find anything suspicious, change all passwords and API keys used by the site (database, email, payment gateway), restore from a clean backup, and get professional help.
Can't update today? Temporary workarounds
PHP's position is clear: updating is the only complete fix. The workarounds below block only some attack paths. They're for developers buying a few hours, not a substitute for patching:
- For CVE-2026-109619: set
session.upload_progress.enabled = 0inphp.ini, the FPM pool or the server config (not withini_set()or.user.ini), then restart every worker. - For CVE-2026-109618: strictly limit request sizes at the web server or proxy, and lower
post_max_size(for example8Mif the site takes no uploads). PHP's other suggested workaround,memory_limit = -1, carries its own risks and must be reverted after patching. - Put the site behind a web application firewall. Cloudflare has deployed free WAF rules for PHP2Shell to all its customers, which it calls a stopgap only.
- If none of this is possible, take the site offline until it's patched. A few hours of downtime costs far less than a breach.
What PHP2Shell means for the public
This isn't only a problem for website owners. When a PHP site is taken over, the people who use it are the ones who get hurt:
- Personal data theft: names, phone numbers, addresses, Aadhaar or ID scans, student records and order history stored by the site can be copied. Researchers also showed the bug can leak memory containing passwords, login tokens and API keys.
- Payment and account fraud: attackers can change payment pages, steal customer logins or impersonate the business.
- Malware and phishing: a trusted local website can be quietly changed to serve malware or fake login pages to its visitors.
- Spam and scam pages: hacked sites are commonly filled with spam pages or redirected to scam sites. Google may then flag the site as hacked or drop it from search results.
- Service outages: schools, clinics, government services and shops can go offline, as several public services already have as a precaution.
For website owners, the cost is real
A hacked website means lost enquiries, a damaged reputation, possible blacklisting by Google and suspension by your host, and the cost of cleanup. In India, CERT-In's 2022 directions also require organisations to report certain cyber incidents within six hours of noticing them, and a leak of customer data can create obligations under data protection law.
What you can do as a website visitor
- Be cautious if a familiar site suddenly redirects you elsewhere, asks you to download something, or asks for an OTP or password when it normally wouldn't.
- Don't reuse passwords across sites. Use a password manager and turn on two-factor authentication where you can.
- If a business tells you about a breach, change that password (and anywhere you reused it) and watch for phishing calls and messages that use your details.
Frequently asked questions
Is PHP2Shell the same as a "PHP web shell"?
No. A web shell is a malicious PHP file that attackers plant on a hacked server so they can control it later. PHP2Shell is the bug that can let them get in to plant one. That's why checking for unknown .php files is part of the cleanup.
I use WordPress and my plugins are up to date. Am I safe? Not necessarily. PHP2Shell is in PHP itself, beneath WordPress. Updating WordPress and plugins doesn't fix it. Your server's PHP must be updated.
My hosting company manages the server. Do I need to do anything? Confirm with them that PHP has been patched, and check that your site isn't set to an old, end-of-life PHP version like 7.4 or 8.1. Most hosts let you choose the version, and a pinned old version may not receive the fix.
Does a firewall like Cloudflare protect me? It helps, but Cloudflare itself calls its rules a stopgap. Attackers are already trying to get around them. Patch PHP as well.
My site is very small. Will anyone bother attacking it? Yes. The attacks are automated and scan the whole internet. Small sites that are rarely updated are often the easiest targets.
Key takeaways
- PHP2Shell lets attackers take over PHP websites without logging in, and attacks are already happening.
- Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or move off PHP 8.1 and older, then restart PHP.
- Updating WordPress or plugins doesn't fix it. The server's PHP must be updated.
- Check for signs of compromise going back to 17 October 2026.
- Visitors' data, money and trust are what's really at risk.
Need help patching or checking your website?
Siliconic Solutions is a software and website development company headquartered in Latur. We can check which PHP version your website really runs, update it safely, test your site afterwards, and look for signs of a break-in.
See our cyber security services or contact us for an urgent check.
Sources: Help Net Security, Datadog Security Labs, Qualys, Tenable, Wikipedia.