Back to Blog
Legacy Modernization

PHP2Shell is now being exploited: what to check on your PHP sites this week

6 min read
CTOs
IT managers
PHP teams

Is PHP2Shell being exploited, and what should I do?

PHP2Shell (CVE-2026-109618 and CVE-2026-109619) lets attackers run code on unpatched PHP sites without logging in, and CISA confirmed active exploitation on 26 Oct 2026. Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 now. If you run PHP 8.1 or older, CISA advises taking those systems offline until they are upgraded.

What changed since the patch

PHP2Shell is the name for two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, that allow remote code execution without a login. We covered the first patches in part one. Since then, things have moved quickly:

  • 21 Oct: PHP released fixed versions. Some leaked proof-of-concept exploits had already been published, but PHP said none of them worked, and the early attack attempts that security firms saw were unsuccessful, BleepingComputer reports.
  • 24 Oct: a security researcher's honeypots recorded 35 shells launched across three test servers, using a four-step chain of web requests, according to SecurityWeek.
  • 26 Oct: CISA added both flaws to its Known Exploited Vulnerabilities catalog, and updated its alert.
  • Who is affected

    According to CISA, the flaws affect every PHP installation that serves web requests, including Apache with mod_php (which PHP considers the highest risk), PHP-FPM, php-cgi, FrankenPHP and LiteSpeed. If your website, store or customer portal runs on WordPress, Laravel or custom PHP, assume you're in scope until you've checked.

    How serious is it, honestly?

    It's real, but it's worth reading the evidence carefully. The honeypots that recorded working shells ran PHP 8.4.26 under Apache mod_php with a single worker, which the researcher described as an "intentionally favorable" setup and "not a measurement of exploit reliability" on other configurations. BleepingComputer also describes the attacks as high-complexity. That's no reason to wait, because CISA now lists the flaws as known to be exploited, but it is a reason to act calmly and in the right order.

    What to check this week

    CISA's guidance comes down to five steps:

  • Find every PHP install. That includes hosting accounts, Docker images and software that bundles PHP inside it. CISA notes PHP is often a component of other software, so it isn't always obvious where it runs.
  • Patch. Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, starting with anything facing the internet. If you're on managed hosting, confirm your host has applied the fix.
  • Can't patch yet, or on PHP 8.1 or older? CISA's advice is to take those PHP systems offline until they're updated. A web application firewall may give some protection in the meantime, but it isn't a fix.
  • Look for warning signs. CISA's advice is to watch for PHP worker processes launching shells or downloading tools. The honeypot attacks also caused out-of-memory errors and worker crashes first, so unexplained crashes in PHP logs are worth a closer look.
  • Follow the official advisory. Use PHP's own security advisory for patching details, and CISA's published detection rule if your team uses one.
  • The separate flaw with no patch yet: CVE-2026-115560

    On 23 Oct, PHP shared a mitigation for another remote code execution flaw, CVE-2026-115560. According to BleepingComputer, it only affects systems with "an unusual combination of configuration and application code": an application that changes its session serialize handler at runtime, with session upload progress still enabled. PHP is fixing it in its regular release cycle.

    Until then, the workaround is one setting: session.upload_progress.enabled=0. If you already applied it, keep it in place.

    PHP 8.1 and older: a business risk, not a patching problem

    PHP 8.1 and older get no official PHP patches. That's why CISA's advice for those versions is to take them offline rather than wait for a fix. If one of your business systems runs on old PHP, the fix is an upgrade.

    The clock is running on PHP 8.2 too. According to PHP's supported versions page, PHP 8.2 security support ends on 31 December 2026. If you patch 8.2 this week, plan the next upgrade now.

    When legacy modernisation pays for itself

    Many business sites still run older PHP because the upgrade was never urgent. A flaw like PHP2Shell changes that. Once an old version stops getting security fixes, every month you stay on it carries a cost, and you can't patch your way out of it.

    There are three ways forward:

  • Upgrade in place. Move to a supported PHP version and fix what breaks. This works when the code is in reasonable shape and the framework supports newer PHP.
  • Refactor. Upgrade the framework and the parts of the code that block the PHP upgrade, in stages.
  • Rebuild. Replace the parts that cost more to keep alive than to rebuild, and move users over gradually.
  • Whichever route you take, test before you switch, roll out in phases and keep a way back. For more, see what a legacy system is and when to replace it, the real cost of technical debt and how to choose a partner for legacy modernisation.

    FAQ

    Is my WordPress site affected?

    If it runs on PHP and serves web requests, it's in scope. Check which PHP version your host runs and update it.

    I'm on shared hosting. Is my host handling it?

    Many hosts patch for you, but don't assume. Check the PHP version in your hosting panel, or ask your host to confirm.

    Is a firewall enough?

    No. CISA says a web application firewall may give some protection until you patch, but it isn't a substitute for updating.

    Not sure what you're running?

    We can audit your PHP versions, patch what can be patched and plan the upgrade for what can't. See our Legacy Modernisation services or book online. Book a free consult on WhatsApp +971 585692165.