← All postsPHP

PHP2Shell: two critical PHP engine flaws and what they mean for your store

Oct 22, 2026

On October 21, 2026, the PHP project released fixes for two critical memory-safety vulnerabilities in the PHP engine, tracked as CVE-2026-109618 and CVE-2026-109619 and collectively nicknamed PHP2Shell. Both are rated CVSS v4.0 9.2, and both can lead to remote code execution. The reason this has become a global alert is simple: the bugs are in PHP itself, not in any one framework or plugin, so they touch every store, WordPress site and custom app that runs on an unpatched PHP.

What the vulnerabilities are

Both are use-after-free bugs triggered when a request dies in a fatal error, typically running out of memory by exceeding memory_limit, before native code has finished cleaning up. A later request, or a reused worker, then treats freed memory as live data.

  • CVE-2026-109618 sits in the upload-progress unserializer and allows memory disclosure as well as code execution. Leaked memory can include passwords, session tokens, API keys and TLS private keys.
  • CVE-2026-109619 sits in the fatal-error backtrace handler and allows code execution through OPcache type confusion.

Every unpatched PHP since 5.4.0 is affected. Setups serving web requests through PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed are all in scope, and mod_php is considered the most exposed.

Fixed versions, and the end-of-life problem

The patched releases are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older receive no official release; the project published minimal source backports for 7.4, 8.0 and 8.1, but those are meant for source builds. If you are on one of those branches, the real options are a vendor or LTS package with the fix backported, or an upgrade to a supported version. For Magento and Adobe Commerce, check the compatibility matrix for your exact release before choosing a target version, and test on staging first.

How worried should you be today?

Reporting is mixed, so we'd rather describe it than pick a side. Amazon recorded an exploitation attempt on October 17, four days before disclosure, and Cloudflare reported early attack traffic. Researchers have demonstrated working exploits, including unauthenticated code execution against Magento 2.4.9. On the other hand, Sansec's assessment on October 22 is that mass exploitation is less likely than first feared: public proofs of concept reportedly fail against a default PHP configuration, and most need a separate file-inclusion bug in the application. Our reading is that urgency is high but not panic, and that the window in which you can patch calmly is short.

What to do

  • Find out which PHP version actually serves your storefront, in production, not just what CLI reports
  • Update to a fixed release through your OS packages, your hosting panel or your container base image. If you don't manage the server, ask your host to confirm in writing which version and patch level you are on
  • Check your repository source: some community-maintained repositories had no update on release day, so confirm the package really contains the fix
  • Restart PHP-FPM or the web server after updating, since long-lived workers keep running the old code
  • Test a full order, an admin image upload and a cron run on staging before and after

Stopgaps, and what they cost

If you cannot update today, Sansec lists temporary measures, none of which replace the patch. Blocking multipart/form-data requests at nginx or Apache cuts off the upload-based paths, but it also breaks file uploads such as product images and can affect some cart or checkout forms. Setting session.upload_progress.enabled to off closes only one confirmed path. Cloudflare has shipped WAF rules for known exploit vectors to all plans, which helps, but a WAF does not fix the engine. Note that Sansec Shield does not cover this layer.

Rotate if you have any doubt

Because CVE-2026-109618 can leak memory that holds secrets, a server that was reachable before patching may have exposed more than code. If you see signs of probing or unusual crashes, treat it like the Adobe Commerce zero-day from September: rotate admin passwords, integration tokens, payment gateway keys, database and deploy credentials, and review the server for unexpected files and cron entries. If you haven't yet closed out the Magento patches, our posts on APSB26-146 and APSB26-153 cover that side.

What we're doing for clients

We are inventorying the PHP version behind every store we maintain, scheduling the update to a fixed release for each one in staging first, and flagging any client still on PHP 8.1 or older, since those need a migration plan and not just a patch. If you're not sure which PHP version your store runs on, start there today.

Let's talk

Facing something similar?

Tell us what's going on with your platform. We'll give you a straight read on it.