Blog 6 min read Leer en español

PHP2Shell: the critical October 2026 PHP vulnerability and what to do if your site runs WordPress

Two flaws in PHP itself let attackers take over a server without a username or password, and they are already being exploited. Here is what to check today if your site runs WordPress or any other PHP system.

Server rack with blue and green status lights on.

In short

On October 21, 2026, PHP released 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two critical flaws (PHP2Shell) that allow code execution without logging in. Since October 26, CISA lists them as exploited. Ask your host to confirm in writing that the patch is installed: the version number does not always prove it.

On October 21, 2026, the PHP project released versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, which let an attacker run code on the server without logging in (php.net advisory (opens in a new tab)). On October 26, the US Cybersecurity and Infrastructure Security Agency (CISA) added both to its catalog of actively exploited vulnerabilities. If your site runs on PHP, as every WordPress site does, the urgent step is to confirm with your host today that the patch is installed.

What is PHP2Shell and why is it so serious?

PHP2Shell is the name Wiz Research, one of the teams that investigated the issue, gave to this family of flaws (php2shell.com (opens in a new tab)). It is serious for three reasons:

  • It is in PHP, not in a plugin. It affects the language that runs your site. Even if WordPress and its plugins are up to date, an unpatched PHP on the server keeps you exposed.
  • No password is needed. A single crafted request is enough to attempt the attack.
  • It affects almost any web server running PHP. According to php.net, every installation serving web requests: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The risk is highest with mod_php, where the attack can happen before any site code runs.

In plain terms, the first flaw (CVE-2026-109618) appears when PHP runs out of memory in the middle of a request: it leaves internal data half-prepared and later treats it as valid. The second (CVE-2026-109619) lets data from one request survive after its memory is freed, so a later request handled by the same process reuses it. In both cases the attacker can end up running their own code.

Which PHP versions are affected?

PHP branchVulnerableFixed versionOfficial security support
8.5Before 8.5.128.5.12Until Dec 31, 2029
8.4Before 8.4.278.4.27Until Dec 31, 2028
8.3Before 8.3.368.3.36Until Dec 31, 2027
8.2Before 8.2.358.2.35Until Dec 31, 2026
8.1, 8.0 and 7.4YesNo official release: vendor patches onlyEnd of life

PHP 8.1 and older no longer receive updates from the project. Given the severity, the PHP security team published minimal source patches for 7.4, 8.0 and 8.1 for people who build PHP themselves (php.net (opens in a new tab)). If your site uses one of those versions, you depend on your provider having patched it, and moving to 8.3 or 8.4 is still the right call. We explain why in why an outdated PHP version is a ticking time bomb.

Is it being exploited already?

Yes. On October 26, 2026, CISA added both vulnerabilities to its Known Exploited Vulnerabilities (KEV) catalog and gave US federal agencies until October 29 to fix them (CVE-2026-109618 (opens in a new tab), CVE-2026-109619 (opens in a new tab)). Since October 21, CloudLinux, whose system runs many shared hosts, has warned that a public exploit tool is circulating and being used for mass scanning (CloudLinux blog (opens in a new tab)).

Mass scans do not pick victims: they sweep the internet for any vulnerable server. A small site is as exposed as a large one.

How do I know if my site is already protected?

Here is the catch: the version number you see does not always tell the truth. Many hosts apply the fix without changing the PHP number. CloudLinux, for example, fixed its ea-php84 in version 8.4.26-2, not 8.4.27, and warns that scanners comparing numbers may raise false alarms. On cPanel, PHP 7.4, 8.0 and 8.1 got the patch on October 21 while keeping their old numbers (EasyApache 4 change log (opens in a new tab)). The reverse can also happen: a recent number on a server that has not been restarted yet.

  1. Check which PHP version your site uses. In WordPress: Tools → Site Health → Info → Server. In cPanel: “Select PHP Version” or “MultiPHP Manager”.
  2. On shared hosting, open a ticket and ask for written confirmation that your server’s PHP package includes the fix for CVE-2026-109618 and CVE-2026-109619. Do not settle for “we are up to date”.
  3. If you run your own server (VPS or dedicated), update the PHP packages and look for both CVEs in the package change log. On CloudLinux, for example: rpm -q --changelog alt-php85-common | grep -E 'CVE-2026-(109618|109619)'. Then fully restart PHP-FPM, LiteSpeed or Apache so they load the fixed code.
  4. If you are on PHP 8.1 or older, plan the move to 8.3 or 8.4 on a staging copy before touching the live site.

On October 21 we checked the PHP version of every site we maintain and asked each provider to confirm the patch. In more than one case the visible version had not changed even though the patch was already installed.

What if I cannot update yet?

php.net is clear: only updating solves the problem. Meanwhile, these measures reduce some attack paths, but they do not make the server safe (php.net (opens in a new tab)):

  • Disable session upload progress: session.upload_progress.enabled=0 in php.ini, the PHP-FPM pool or the server configuration. Doing it with ini_set() or .user.ini does not work.
  • Lower post_max_size to 8M (or 32M if the site needs uploads) and keep upload_max_filesize below it.
  • On PHP 8.5, set fatal_error_backtraces=0.
  • Restart every PHP process after each change.

A web application firewall (WAF) can stop some attempts, but the flaw is in PHP: it does not replace the patch.

What if I suspect someone already got in?

If the patch arrived late, check the site before calling it clean. In the WordPress cleanups we did in October 2026 (through a different entry point), the most common traces were .php files inside wp-content/uploads, administrator accounts nobody had created and plugins with odd or duplicated names. If you find something like that, do not delete blindly: isolate the files, change every password and check the database too. In how hackers use your site without you noticing we explain what to look for.

How do we handle it at DapSite?

In our maintenance plans we follow PHP and hosting security advisories, confirm that each patch is installed on every site’s server and make version changes on a staging copy first. If you are not sure where your site stands, request a free review and we will tell you which PHP version it runs and what to do.

If your site already shows signs of infection, such as strange redirects, spam or Google warnings, see our service to recover a hacked website.

Frequently asked questions

Does PHP2Shell affect WordPress?

Yes, indirectly: the flaw is in PHP, the language WordPress runs on. An up-to-date WordPress on unpatched PHP is still exposed. Wiz Research demonstrated attacks against WordPress, Drupal and Joomla.

My host shows PHP 8.3.35. Am I at risk?

Not necessarily. Many providers apply the patch without changing the version number. The only way to know is for your host to confirm that its PHP package includes the fix for CVE-2026-109618 and CVE-2026-109619.

Do I need to change hosts?

No, if your provider confirms the patch. It is worth considering if they do not answer, do not know which package you have, or still offer unpatched PHP 8.1 or older.

Will a security plugin protect me?

Only partly. A plugin or firewall can block some attempts, but the bug is in PHP and only the update fixes it.

Sources

  1. Security advisory: Critical remote code execution vulnerabilities, update now — php.net (opens in a new tab) · php.net, 21 Oct 2026
  2. RCE via OOM corruption (GHSA-w8hw-w9fx-j79w) — php/php-src (opens in a new tab) · github.com
  3. RCE via stale global state (GHSA-6wmf-4rv5-p3rp) — php/php-src (opens in a new tab) · github.com
  4. Known Exploited Vulnerabilities Catalog: CVE-2026-109618 — CISA (opens in a new tab) · cisa.gov, 26 Oct 2026
  5. Known Exploited Vulnerabilities Catalog: CVE-2026-109619 — CISA (opens in a new tab) · cisa.gov, 26 Oct 2026
  6. PHP CVE-2026-109618 and CVE-2026-109619 — CloudLinux (opens in a new tab) · blog.cloudlinux.com, 21 Oct 2026
  7. EasyApache 4 Change Log 25 (25.91 and 25.92) — cPanel (opens in a new tab) · docs.cpanel.net, 21 Oct 2026
  8. Supported Versions — php.net (opens in a new tab) · php.net
  9. PHP2Shell — Wiz Research (opens in a new tab) · php2shell.com
  10. PHP2Shell: critical PHP RCE — Wiz (opens in a new tab) · wiz.io

Keep reading

See all articles