PHP2Shell: Which PHP Systems to Patch, Isolate or Replace Now

PHP2Shell: Which PHP Systems to Patch, Isolate, or Replace Now

On October 21, 2026, the PHP Project patched two critical vulnerabilities known as PHP2Shell. These vulnerabilities allow attackers to execute code on web servers without logging in, and, according to the researchers who discovered them, are present in all PHP versions starting with 5.4. Since October 26, the U.S. agency CISA has listed both vulnerabilities as actively exploited. The PHP Project does not release new versions for PHP 8.1 and earlier. This affects IT management in industry and commerce with their own portals, intranets, and online stores; plant and production management using manufacturer products in which PHP runs unnoticed; and machine builders who ship PHP in user interfaces or gateways.

Short answer

Servers running PHP 8.2 through 8.5 should be updated now to 8.2.35, 8.3.36, 8.4.27, or 8.5.12, or to the fixed package provided by your Linux distribution, followed by a restart of all PHP services. Remove applications running on PHP 8.1, 8.0, 7.x, or 5.x from the internet until a backport from the distributor has been installed or the application has been updated to a supported version. Update vendor products with embedded PHP according to the vendor’s advisory. The starting point is a list of all locations where PHP is running, including devices and appliances.

Fixes by PHP version branch, as of October 28, 2026. Sources: PHP security advisory dated October 21, 2026; Tenable FAQ (as of October 26, 2026)
PHP Version Fix from the PHP project What You Do
8.5, 8.4, 8.3, 8.2 8.5.12, 8.4.27, 8.3.36, 8.2.35 Update, restart services
8.1, 8.0, 7.4 No new release, just minor source code backports Check the distributor's backport; otherwise, isolate it and plan an upgrade
5.4 to 7.3 None Isolate, upgrade or replace

What PHP2Shell Is and What Is Known So Far

Both vulnerabilities reside in the PHP interpreter itself. CVE-2026-109618 occurs when PHP aborts a request due to insufficient memory and subsequently treats partially initialized data as valid. In the case of CVE-2026-109619, the internal state of a request persists even after memory has been released, and a subsequent request in the same process accesses it. Both are rated 9.2 on the CVSS 4.0 scale. According to PHP, every installation that processes web requests is affected, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. The PHP team considers mod_php to pose the highest risk because the attack is triggered there before application code runs (PHP, 21.10.2026).

Amazon Threat Intelligence observed an initial exploit attempt as early as October 17 and recommends reviewing logs starting from that date. On October 24, a researcher reported successful attacks on honeypots running PHP 8.4.26 (Tenable, Oct. 26, 2026). The BSI has issued a cybersecurity alert, and CISA added both vulnerabilities to its catalog of actively exploited vulnerabilities on October 26 (CISA, Oct. 26, 2026). On October 23, PHP also recommended setting session.upload_progress.enabled=0 until the next regular release.

How dangerous it is in each individual caseExperts are divided on the issue. Sansec reports that publicly available exploits generally do not work against a standard installation and often require a second vulnerability in the application (Sansec, 10/2026). Wiz shows, by contrast, that passwords and tokens can be read from memory even without code execution. This changes little for the decision, because only the update provides complete protection.

Where PHP Is Used in Your Company

Beyond the company website, PHP runs in custom-developed portals, in off-the-shelf software on the company's own servers, and in products whose manufacturers use PHP for the web interface.

Typical PHP Systems in Industry and Commerce, as of October 28, 2026. Sources: Calif (October 2026), SecurityWeek (October 26, 2026), with information from manufacturers
Area Examples Who provides the correction
Custom Web Applications Supplier and complaint portals, internal tools built on Laravel or Symfony Your IT department or your service provider
In-House Standard Software WordPress, Nextcloud, MediaWiki, phpMyAdmin, Roundcube, online stores built on Magento or Shopware Operator, via the server's PHP package
Manufacturer's Products in the Factory and Warehouse Schneider Electric ProLeiT LINEoptimize, B&R APROL up to R 4.4-65, ABB MES deliveries with DokuWiki, Wibu-Systems CodeMeter License Central Manufacturer
Equipment and Remote Maintenance HMS Netbiter, Belden NetModule routers, macmon NAC Manufacturer, via firmware
34,3 %

of websites using PHP still run version 7 or 5, for which the PHP project publishes no new release.

W3Techs, October 2026

Here’s an example from the supplier industry: A company with four plants identifies 14 PHP systems during an inventory check. Six are running PHP 8.2 or 8.3 from distribution packages and are updated within a day. Three are vendor-provided products for which the update is pending. Five are in-house applications running on PHP 7.4, including the supplier portal. Based on our estimates, updating one such application to PHP 8.3 takes between 10 and 25 person-days, depending on the framework version and test coverage, so 50 to 125 person-days for all five. Until then, the five applications must be taken offline or moved behind a login, such as a VPN for suppliers.

Your Options: Effort, Costs, and Risks

Options for Action, Own Assessment, as of October 28, 2026
Option Effort Costs Risk
Update to 8.2.35 through 8.5.12 or distribution package Hours per server Internal Time Minor, but Tenable reports a regression in versions 8.4.27 and 8.5.12, so test briefly beforehand
Distributor backport for versions 7.4 through 8.1 Hours Low; subscription-based for LTS providers The application remains on a version without regular support
Isolate or take offline Hours Low Suppliers and field staff lose access, suitable only as an interim measure
Update the application to PHP 8.3 or 8.4 Weeks Resources, person-days Few tests; without tests, errors aren't noticed until the system is in operation
Replace or Rebuild the Application Months High Data Migration and Parallel Operation
Do nothing None None for now Attackers can break into the corporate network. A known, actively exploited vulnerability is hard to justify in a NIS2 audit

PHP's intermediate measures, such as limits on post_max_size and turning off session.upload_progress, reduce the attack surface but, according to PHP, do not close the vulnerabilities.

Which approach fits which PHP system

For servers running a supported PHP version, the update is the only sensible option, and it belongs in this week. For legacy applications, the deciding question is how much longer they will be needed. If a portal is being retired in 2027 anyway, a backport and isolation are enough. If it will stay in use for years, now is the time to upgrade, because nobody will fix the next vulnerability in PHP 7.4 either. For vendor products, you need a commitment as to when the vendor will deliver the fix.

Machine builders and gateway manufacturers face an additional question: since September 11, 2026, the Cyber Resilience Act has required an early warning within 24 hours if a product contains an actively exploited vulnerability. Whether PHP2Shell in your user interface triggers this obligation is a legal question you should clarify with your legal department today. The reporting process is described in the article CRA Reporting Requirements for Machinery Manufacturers.

Initial Consultation on PHP2Shell in Your SystemsWe’ll review your PHP installations, from your own applications to vendor-provided products, including their versions and online availability; discuss what to look for in your web server logs starting October 17; and outline the options for applications running on PHP 8.1 or older, including backporting, isolation, updating, or replacement. 30 minutes, free of charge, response within one business day.

Request a first call

Frequently Asked Questions

Is it enough to update PHP on the web server?

Only partially. After the update, all PHP services and workers must be restarted and containers rebuilt. Products with embedded PHP require an update from the manufacturer. And because attacks were already underway before the patch was released, a review of the logs from October 17 onward is part of it.

Is PHP 8.1 vulnerable on Ubuntu or Debian?

Not necessarily. The PHP project is not releasing a new version for 8.1, but distributions and LTS providers have received the fixes in advance and some are providing backports. The exact package version listed in your distributor’s security advisory is what matters, not the displayed PHP version.

Do machine builders have to report PHP2Shell under the Cyber Resilience Act?

If PHP is used in a product containing digital elements and the vulnerability is considered to be actively exploited, the reporting requirement under Article 14 may apply: early warning within 24 hours, report within 72 hours. Whether this applies to your product requires a case-by-case legal assessment, which we cannot perform on your behalf.

The Next Step

torck modernizes legacy applications for industry and retail without interrupting operations, from PHP upgrades to complete replacements. You can find out how we do this on the page Legacy Modernization, and for inventory and operations you can rely on our Professional Services. For more background information, see Modernize or replace legacy software?, Measuring Technical Debt and LiteLLM Compromised. Schedule an Initial Consultation.

Questions about this post?

Just a couple of sentences about your situation will suffice. The person responding builds these kinds of systems himself.

We'll respond within one business day.torck · Code mit Drehmoment
Florian Blischke
Managing Director at torck · Over 20 years of software development experience
Florian Blischke is the managing director of torck, based in Maxhütte-Haidhof near Regensburg. He has been working in software development for over 20 years. His focus is custom software, data and AI for industry and retail, ranging from the integration of physical processes and IoT to cloud architecture and data- and AI-driven systems. torck works with its own nearshore team in Rabat. At torck, he oversees projects including the Jouvoli energy platform and the KVM Fleet fleet management product. torck develops software at its locations in Maxhütte-Haidhof, Vienna and Rabat and focuses on software that actually works in operation.

Are you facing the same question?

Since 2017, we have been building software for industry and retail from Maxhütte-Haidhof near Regensburg, with teams in Vienna and Rabat. An initial consultation takes 30 minutes and costs nothing. Afterwards you will know whether the project is worth pursuing, even if the answer is no.

More Articles