Critical PHP Vulnerability and WordPress: What to Do Today (and Why You Need Off-Site Backups)
PHP2Shell WordPress Vulnerability: What to Fix and Why Backups Matter
On October 21, 2026, the PHP project released emergency security updates for two critical vulnerabilities affecting the language that powers WordPress. The flaws, tracked as CVE-2026-109618 and CVE-2026-109619, have a CVSS v4.0 severity score reaching 9.2. Researchers collectively refer to the vulnerabilities as PHP2Shell.
Under certain conditions, attackers can exploit these flaws to execute code on a vulnerable server without logging in. The vulnerabilities can also expose sensitive information stored in PHP process memory, including passwords, authentication tokens, and API keys.
For WordPress owners, there is an important distinction: updating WordPress, plugins, or themes does not fix PHP2Shell. The vulnerabilities exist in PHP itself, meaning the server’s PHP installation must be patched.
If you manage a WordPress website, here is what you need to check, how to respond, and why having a reliable off-site backup matters before making changes.
What Researchers Discovered About PHP2Shell
According to Wiz Research’s PHP2Shell investigation, the first vulnerability was discovered on August 19, 2026, with AI-assisted security research tools. Researchers confirmed unauthenticated remote code execution against WordPress on August 21 and reported the vulnerabilities to the PHP security team on August 24.
The findings involve two different problems in PHP’s memory handling.
CVE-2026-109618 involves errors in how PHP handles certain out-of-memory conditions. When request processing stops unexpectedly, internal data may not be initialized correctly, creating opportunities for memory corruption.
CVE-2026-109619 involves request state that remains accessible after the underlying memory has been released. In certain circumstances, later processing can access this invalid state and potentially lead to code execution.
Researchers demonstrated successful attacks against WordPress, Drupal, and Joomla environments. The underlying problems affect PHP itself rather than any specific CMS, and versions dating back to PHP 5.4 are affected by at least one of the vulnerabilities.
This is why even a fully updated WordPress installation can remain exposed when its hosting environment runs vulnerable PHP code.
Are WordPress Websites Being Actively Targeted?
The threat is not limited to a theoretical vulnerability.
In its October 2026 PHP security alert, Patchstack reported that hosting partners had observed cases of active exploitation. Cloudflare also identified early attack activity and introduced baseline firewall protections.
At the time, Patchstack’s own monitoring primarily detected probing attempts rather than widespread confirmed compromises.
Still, the combination of publicly disclosed vulnerabilities, potential unauthenticated remote code execution, and slow server patching makes this a serious concern.
Website owners should not assume their installation is safe simply because WordPress itself is up to date.
Which PHP Versions Fix PHP2Shell?
The PHP project released security updates on October 21, 2026.
The following table shows the patched upstream PHP versions and the recommended action for each branch.
| PHP version | Patched release | Recommended action |
| PHP 8.5 | 8.5.12 | Update to this release or later |
| PHP 8.4 | 8.4.27 | Update to this release or later |
| PHP 8.3 | 8.3.36 | Update and plan a future upgrade |
| PHP 8.2 | 8.2.35 | Update and plan migration before end of support |
| PHP 8.1 or older | No standard upstream security release | Confirm vendor backport or upgrade |
Some Linux distributions and commercial PHP vendors provide security backports without changing the major PHP version number. As a result, an older-looking version is not necessarily unpatched.
If your hosting provider uses a custom PHP package, ask them to confirm whether both CVE-2026-109618 and CVE-2026-109619 have been addressed.
PHP 8.2 reaches the end of its official security support on December 31, 2026. For a longer-term upgrade, PHP 8.4 or 8.5 is a sensible target, provided your WordPress plugins and themes are compatible.
What WordPress Owners Should Do Today
The safest response is to verify your PHP installation, prepare a recoverable backup, and coordinate the update with your hosting provider.
1. Check your current PHP version
Sign in to your WordPress dashboard and navigate to:
Tools → Site Health → Info → Server
Look for the PHP version currently running your website.
You can also find this information in your hosting control panel, often under PHP Settings, MultiPHP Manager, or a similar section.
Remember that the version number alone may not confirm whether your hosting provider has applied a vendor-specific security patch.
2. Create a full backup before making changes
Changing PHP versions can expose compatibility problems with older themes, plugins, or custom code.
A complete backup gives you a recovery option if an update causes errors or unexpected behavior.
Your backup should include:
- The complete WordPress database, including posts, pages, users, and settings.
- Themes, plugins, uploaded images, and other website files.
- Configuration files needed to restore the installation.
If you are unsure what needs to be included, our guide to creating a full WordPress backup explains the essential components and how they work together.
Before proceeding, make sure the backup has completed successfully and can be accessed independently of your hosting account.
3. Contact your hosting provider
Ask your hosting company whether the PHP installation has received fixes for both vulnerabilities.
If not, request an upgrade to a patched release or an officially maintained vendor package.
For managed hosting customers, the provider may handle PHP security updates automatically. However, it is worth confirming the patch status rather than assuming the update has already happened.
4. Avoid unofficial security fixes
Do not install random PHP patches, unverified WordPress plugins, or code snippets claiming to eliminate PHP2Shell.
The vulnerability affects PHP’s internal memory handling. A WordPress plugin cannot reliably repair that underlying problem.
Use official PHP releases or security packages provided by trusted maintainers.
5. Review your server logs
If your website was accessible while running a vulnerable PHP version, check for suspicious activity.
Pay particular attention to unusual requests, unexplained PHP errors, and unexpected worker restarts.
These indicators do not automatically mean your website has been compromised, but they deserve investigation.
What If Your Hosting Provider Cannot Patch PHP Immediately?
Temporary mitigations may reduce exposure, but none should be treated as a replacement for installing the security update.
Patchstack documents several server-level measures, including restrictions on request sizes and disabling PHP session upload progress. The exact configuration depends on the vulnerability, PHP version, and hosting environment.
For example, its guidance for CVE-2026-109618 includes setting memory_limit=-1 under appropriate server-level controls, alongside separate operating-system or container memory limits. Simply reducing PHP’s memory limit is not a universal fix and can introduce additional problems.
For CVE-2026-109619, disabling session.upload_progress.enabled can block certain confirmed attack paths, but not necessarily every variant.
These changes should be evaluated and applied by your hosting provider or server administrator.
A web application firewall may provide additional protection, but it should not be considered a complete solution. Cloud-based firewall rules can also be bypassed if attackers can reach the origin server directly.
For a high-risk website that cannot be patched promptly, temporarily restricting public access or enabling maintenance mode may be the safer option.
How to Recognize Possible PHP2Shell Attacks
According to Patchstack, potential warning signs include unusual multipart requests associated with PHP memory errors, abnormally large PHPSESSID cookies, and unexplained PHP worker restarts.
You may also notice increases in HTTP 500 errors or unfamiliar processes and files on the server.
These symptoms have legitimate causes too, so a single error is not proof of an attack.
However, if you suspect a compromise, preserve relevant logs and contact your hosting provider or incident-response specialist.
Avoid restoring the website immediately without investigating. A compromised environment may contain malicious files, altered credentials, or persistence mechanisms that survive a simple content restoration.
Any credentials potentially exposed during the incident should be rotated after the affected environment has been secured.
Why Off-Site WordPress Backups Matter During Security Incidents
A backup does not prevent PHP2Shell exploitation.
It cannot patch PHP, block malicious requests, or stop attackers from exploiting a vulnerable server. What it can do is provide a path to recovery when files are damaged, data is deleted, or an update causes the website to fail.
The usefulness of that backup depends on three important factors.
1. Where your backup is stored
Keeping the only backup on the same hosting account as your website creates a significant risk.
If an attacker gains sufficient access to the hosting environment, locally stored backup archives may be modified, deleted, or stolen alongside the website’s files.
Off-site backups reduce that shared dependency by storing recovery copies outside the original server.
BackupWP uses cloud-based backup infrastructure to store website data separately from the hosting environment. Its backup process is designed to minimize server resource usage rather than relying on large archives generated locally.
This separation is particularly useful when a hosting server becomes unavailable or must be rebuilt following a security incident.
Off-site storage does not guarantee that every backup is clean or inaccessible to an attacker, but it provides an important additional recovery layer.
2. How much backup history is available
Not every security incident is discovered immediately.
A website may continue operating after malicious code has been introduced. If backups are created during that period, recent copies could contain the same compromised files.
For this reason, retaining multiple restore points is often more useful than keeping only the latest backup.
BackupWP offers different retention periods depending on the plan:
| BackupWP plan | Backup retention | Backup frequency |
| Free | 7 days | On-demand |
| Starter | 30 days | Daily |
| Professional | 90 days | Twice daily |
| WooCommerce | 365 days | Real-time backups |
For a small website, a short retention period may be sufficient for routine mistakes or failed updates. For frequently updated websites, online stores, or sites handling important business information, longer history can provide more recovery options.
However, longer retention alone does not guarantee a clean restore point. Backups should still be checked for signs of compromise before being used.
How frequently a site needs backups also depends on how much information changes between copies. A personal blog and a busy WooCommerce store have very different requirements.
Our guide on how often to back up your WordPress site explores those differences in more detail.
3. How quickly you can restore your website
When a website goes offline, recovery time matters.
BackupWP provides one-click restoration functionality, reducing the need to manually upload website files and import database backups.
Actual recovery time depends on the website’s size, available infrastructure, and the nature of the incident.
More importantly, restoration should happen only after the original vulnerability and any remaining malicious access have been addressed.
Our step-by-step guide to restoring WordPress from a backup explains the available recovery methods and what to check afterward.
Can You Safely Restore a Hacked WordPress Website?
Yes, provided the recovery process addresses the underlying cause of the compromise.
Restoring an older copy onto an unpatched PHP server may recreate a working website, but it leaves the same vulnerability available to attackers.
A safer recovery process follows this order:
- Contain the incident. Restrict access to the compromised environment and preserve evidence needed for investigation.
- Identify and fix the entry point. Apply the PHP security update and address any other identified vulnerabilities.
- Select a trusted restore point. Review backup history and look for a copy created before the suspected compromise.
- Restore into a clean environment. Avoid reusing compromised files, credentials, or server configurations.
- Rotate credentials and verify the result. Update relevant passwords, keys, and access tokens, review user accounts, and check the restored website before reopening it.
For complicated incidents, professional security assistance may be necessary.
A backup is a recovery resource, not a substitute for incident response.
Planning Your Next PHP Upgrade
Installing the PHP2Shell security update should be the immediate priority, but it is also worth reviewing your longer-term PHP support strategy.
PHP 8.2 reaches the end of its official security support on December 31, 2026. If your website currently depends on that branch, plan a move to PHP 8.4 or 8.5 after checking compatibility with your plugins, themes, and hosting environment.
Before upgrading, create a fresh backup and test the new PHP version on a staging website wherever possible.
If an update fails, an accessible backup can help you restore service while you resolve compatibility issues.
For website owners without an established backup routine, BackupWP’s free WordPress backup plugin provides on-demand backups, off-site cloud storage, and seven-day retention.
The priority is straightforward: patch PHP to eliminate the vulnerability, and maintain reliable backups so that technical failures or security incidents do not become permanent data loss.
FAQ
No. PHP2Shell affects the PHP interpreter, not WordPress core. Updating WordPress, plugins, and themes remains important for general security, but the PHP installation itself must receive the relevant security patch.
Yes. Researchers demonstrated exploitation against current WordPress environments because the vulnerabilities exist in PHP rather than in a particular plugin or theme.
The patched upstream versions are PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, along with later releases containing those fixes. Some vendors also offer patched packages for older PHP branches.
Yes. A full backup helps you recover if a PHP upgrade introduces compatibility problems or causes your website to stop working. Ideally, test the change in a staging environment before updating production.
A clean backup can help replace compromised files and data, but restoration alone does not guarantee malware removal. You must identify and fix the entry point, remove persistence mechanisms, and secure the server before returning the website to service.
Off-site backups generally provide better separation from hosting failures and server compromises. However, their effectiveness also depends on secure access controls, retention policies, and regular recovery testing.