Skip to content

Advisories

PHP2Shell, Node2Shell and Java4Shell: What to Patch First

Three critical flaws in PHP, Node.js and Java, and they are not equally urgent. Which to patch first, the fixed versions, and how to check if you are exposed.

The ForgePath Bench
6 min read
Critical
Security advisory
Affected
PHP, Node.js and other software that bundles Brotli, and Java 17 to 27
Action required
Patch internet facing systems now, starting with PHP

Summary

Three critical remote code execution flaws in PHP, Node.js and Java were published between October 21 and November 17, 2026. Fixes exist for all three.

They are not equally urgent. Two are being exploited now. The third needs a specific processor and a specific coding pattern before it can be used. This advisory ranks them, lists the fixed versions, and explains how to check whether you are exposed.

Status in this advisory is as of November 25, 2026.

What happened

PHP2Shell (CVE-2026-109618 and CVE-2026-109619). On October 21 the PHP project fixed two memory safety flaws in how PHP handles fatal errors while it processes a request. An attacker who can send requests to a PHP site can run code on the server without logging in. CISA added both to its Known Exploited Vulnerabilities catalog on October 26. Attackers have since used them against Palo Alto firewall management pages that were reachable from the internet.

Node2Shell, also called HTTP2Shell (CVE-2026-111497). The same day, Node.js fixed an out of bounds write in Google’s Brotli decompression library. Brotli is also built into Bun, .NET and several Python packages, so each of them had to ship its own fix. CISA added the flaw to its catalog on October 27.

Java4Shell, also called Java2Shell (CVE-2026-114938). On November 17 Oracle and OpenJDK fixed a heap out of bounds write in the fast Base64 decoder that Java uses on processors with AVX-512 VBMI. CISA issued an alert the same day urging organizations to patch. GreyNoise has reported exploitation attempts. No successful exploitation had been confirmed in the reports we reviewed, the latest dated November 19. The flaw was not in CISA’s exploited catalog when this advisory was published.

Which one to fix first

FlawExploited nowWho is exposedOrder
PHP2ShellYes. Listed by CISA.Any web server running PHP 5.4 or later.First
Node2Shell (Brotli)Yes. Listed by CISA.Applications that decompress Brotli data from a source they do not control. In Node.js that includes the built in fetch() and request parsing in Express 5. Python HTTP clients decode Brotli automatically when the package is installed. In .NET, Brotli decompression is off unless the application turns it on.Second
Java4ShellAttempts reported. None confirmed.Only where three things are true together. The Java version is affected, the processor supports AVX-512 VBMI, and the application passes data an attacker controls to Base64.getDecoder() or Base64.getUrlDecoder().Third

One analysis estimates that fewer than 0.12% of Java runtimes are at real risk of code execution from Java4Shell. A crash is easier to cause than a takeover. It still needs patching, but it does not belong ahead of an exploited PHP server.

Affected and fixed versions

SoftwareAffectedFixed in
PHP5.4 and later, before the October 21 releases8.5.12, 8.4.27, 8.3.36, 8.2.35. PHP also published source fixes for 7.4, 8.0 and 8.1, and some Linux distributions and extended support vendors ship patched packages for older branches.
Node.js22, 24 and 26 before the fix. Version 20 and older are affected and will not be fixed.22.23.4, 24.22.1, 26.12.1
Bun1.4.3 and earlier1.4.4
.NET8, 9 and 10 before the fix. .NET Framework is not affected.8.0.33, 9.0.22, 10.0.14
PythonThe Brotli and brotlicffi packages before the fixBrotli 1.2.1, brotlicffi 1.2.1.0
Java (OpenJDK, Oracle JDK)17.0.6 and later, 21, 25 and 27, on x86-64 processors with AVX-512 VBMI. Standard Java 8 and 11 are not affected.17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1. Other vendors publish their own builds, so confirm yours.

These runtimes also sit inside products you buy, such as client portals, document systems, build servers and security appliances. Your own servers are only part of the list.

What to do

  1. Fix PHP first. Start with anything that faces the internet, such as websites, client portals and APIs.
  2. Take management pages off the internet. Firewall, VPN and appliance admin pages should be reachable only from trusted internal addresses. Palo Alto’s guidance for affected firewalls is to remove public access immediately.
  3. Patch the runtime, not just the package. Updating an npm Brotli package does not fix the copy built into Node.js. Updating your application does not fix the Java it runs on.
  4. Rebuild and restart. A container image pinned to an old runtime stays vulnerable until it is rebuilt. So does a program compiled with bun build --compile. A Java update takes effect only after each Java process restarts.
  5. Retire versions that will not be fixed. Node.js 20 and older fall in this group, along with any PHP branch your vendor no longer patches.
  6. If you cannot patch Java yet, use the workaround. Start the JVM with -XX:-UseBASE64Intrinsics. It turns off the affected decoder and may slow applications that decode a lot of Base64, so test it first. It does not replace the patch.
  7. Ask your vendors in writing. Ask whether each product is affected and when it was patched. Keep the answers for your auditors.

To check whether a Linux server’s processor has the feature Java4Shell needs, run grep -om1 -E 'avx512[_]?vbmi' /proc/cpuinfo. No output means the processor does not support it.

If you were exposed before you patched

PHP2Shell and the Brotli flaw have been exploited since late October. A patch closes the hole. It does not remove an attacker who already used it.

If an affected system faced the internet without the fix at any point after October 21, check it.

  • Look in web directories for files your team did not deploy.
  • Look for new administrator accounts, new scheduled tasks and unfamiliar outbound connections.
  • Change the passwords, API keys and database credentials stored on that server. SOCRadar has reported a campaign that used PHP2Shell to harvest credentials.
  • Review web server logs from October 21 onward for crashes and repeated errors that have no other explanation.

If you find something you cannot explain, treat it as an incident. Our Under Attack page explains how to reach us.

Why three at once

All three are memory corruption bugs in the native code underneath languages most teams treat as memory safe. Your PHP, JavaScript or Java code cannot overflow a buffer. The engine that runs it is written in C, C++ and hand tuned processor instructions, and it can.

AI is now being pointed at that layer. Wiz Research, one of the teams credited with PHP2Shell, says an AI model “made an invaluable contribution to finding the vulnerability”. The Brotli flaw was reported by OpenAI’s Codex Security team. Java4Shell was reported by Calif.io, which is also credited on the PHP flaws. The public reports for those two do not say whether AI was used.

Attackers have the same tools. PHP2Shell was on CISA’s exploited list five days after the fix was released. The Brotli flaw took six.

Our view is that more of these will arrive, and in clusters. Two changes follow from that.

  • Internet facing systems need their own patch path. A monthly cycle does not cover a gap of five days.
  • Rank by exposure, not by name. A memorable name says nothing about your risk. Exploitation status, internet exposure and how your systems are configured do. Java4Shell is named after Log4Shell, one of the most damaging flaws of the past decade, yet few systems meet the conditions it needs.

Both depend on a current list of which systems run which runtime. Without it, the question “are we exposed?” cannot be answered with confidence.

How ForgePath can help

We work with CPA firms, healthcare companies and financial institutions. We map which of your internet facing systems run PHP, Node.js, Java or software that bundles Brotli, test them safely for these flaws with your written authorization, and give you a ranked fix list.

Contact us to set up a check, or read about vulnerability management and external network penetration testing.

Sources

Ready?

Bring us
the problem.

One conversation with a senior practitioner who has carried this responsibility before. We will tell you what we would do, and whether it is us.