On 16 November 2026, AWS published a guide on moving legacy PHP onto a patched runtime after PHP2Shell. The useful part is the decision it forces on anyone still running PHP 8.1 or older.
A forced security upgrade is the cheapest moment to decide where the application goes next: stay on PHP, or move to Java 21 / Spring Boot. Upgrading PHP is a valid answer for many teams. Skipping the decision is the expensive one.
What PHP2Shell actually is
PHP2Shell is the name used for two critical bugs in the PHP engine, CVE-2026-109618 and CVE-2026-109619. AWS gives both a CVSS v4.0 score of 9.2, because either one can let an unauthenticated caller run code on a server that handles PHP requests. CISA uses the same name and CVE IDs, and on 26 October 2026 it added both to its Known Exploited Vulnerabilities catalog.
The PHP project fixed the bugs on 21 October 2026, in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. The PHP Foundation and php.net confirm those CVE IDs and releases. If you already run a supported 8.2 to 8.5 branch, the immediate work is a point-release update and a worker restart. That is a patch, not a rewrite.
Where an in-place patch stops
AWS is direct on older runtimes: if you run PHP 8.1 or older, you cannot patch PHP2Shell in place, because no official PHP release fixes those branches. The same AWS article, and php.net, add a caveat. Some Linux distributions and LTS vendors ship backported fixes, and the PHP security team published minimal source backports for 7.4, 8.0 and 8.1 as a stopgap for people who build from source. Those are holding measures, not a supported PHP branch.
For the official upgrade path, AWS recommends moving the application to PHP 8.4 or 8.5, based on remaining support dates. That is often harder than a point release, because legacy code can break on a newer PHP runtime. AWS itself says the code upgrade is the real blocker.
Two valid next steps
Once you have to change the application to leave 8.1, you have two honest options.
The first is to upgrade PHP, to 8.4 or 8.5 as AWS recommends, or to another supported branch if that is what your team can run. For many products this is the right call. The team already knows PHP, and the business may have no reason to leave it. A planned PHP upgrade is a complete answer to PHP2Shell.
The second is to use the same forced change as the moment to move off PHP, if Java 21 / Spring Boot was already on the roadmap, or if the hiring, integration or long-term support case for Java is already made. The security incident does not create that case by itself. It only makes the cost of waiting more obvious, because you are already paying to touch the code.
Neither option should be a panic rewrite with no proof that the new system matches the old one on real user journeys. A PHP major-version jump and a language change can both alter responses, database writes or outgoing calls.
If the destination is Java 21
MigrateForge converts plain PHP and CodeIgniter 3 to Java 21 / Spring Boot. Laravel is not supported. It runs locally. It replays recorded journeys and compares HTTP responses, database writes and outgoing calls. Cutover stays blocked until replay reaches 99.5% or better. Each wave is at most 150 units or 8,000 lines.
On two benchmarks, WA Blast Pro and InvoicePlane, not client projects, 858 fixtures reached 100% parity. That is a benchmark result. It is not a claim of 100% behavioural parity in production, and it is not a claim of zero risk.
A free report on one module is ₹0 at migrateforge.com.
The AWS article is here: PHP2Shell: Using AWS Transform to move legacy PHP onto a patched runtime. CISA's alert and the php.net advisory of 21 October 2026 independently confirm the CVE IDs, the fixed releases, and the position on PHP 8.1 and older.
CTOs and engineering leaders: if a security fix already forces you off PHP 8.1, will you upgrade PHP, move to Java, or postpone the choice until the next CVE?


