Why the 2026 "2Shell" and "2Root" bugs are hard to exploit

PHP2Shell, Node2Shell and Java4Shell corrupt memory inside the language runtime, so each one needs a memory leak, offsets for the exact build and several tries before it gives a shell. Each also reaches only some deployments. Log4Shell needed one request on any default install.
Two of the three, plus the kernel bug chained with PHP2Shell, are still in CISA KEV, because on a fleet of identical machines the attacker does the hard part once. For a defender, the work is to find which of your systems each bug can reach and patch those first.
KEV data is from CISA catalog version 2026.11.25; EPSS scores are from FIRST, dated 26 November 2026.
What to check first
- Check your stack before the score. Do you run mod_php or PHP-FPM? Does anything decode Brotli from untrusted input? Does Java run on AVX-512 hardware? Are unprivileged user namespaces allowed?
- EPSS predicts exploitation activity, which includes scanning and blind attempts, so it says little about difficulty. Java4Shell has the highest EPSS of the three (0.593) and no KEV listing; Node2Shell has 0.330 and is in KEV.
- Expect severity scores to disagree. Oracle rates Java4Shell 8.1, Amazon Linux 8.8, Calif 9.2 and Red Hat 9.8, because they disagree on attack complexity and on whether a login is required.
- Weight fleets heavily. A hard bug on one unique server can wait a cycle; the same bug on a thousand identical pods cannot.
- PHP2ShellTick how PHP runs.
- Node2ShellTick whether anything decodes Brotli.
- Java4ShellTick the CPU and JDK.
- Fragnesia (root step)Tick whether user namespaces are allowed.
The three bugs
PHP2Shell (CVE-2026-109618 and CVE-2026-109619) is a use-after-free when PHP runs out of memory mid-request, triggered by a crafted upload. Fixed in 8.2.35, 8.3.36, 8.4.27 and 8.5.12 on 21 October 2026; PHP 8.1 and older get no fix. The PHP advisory scores attack complexity as high, and the reliable path is Apache mod_php; for PHP-FPM the advisory knows of no complete exploit, while Calif says it has one. Intel 471 ran a public exploit against identical fresh containers and got one shell in about 24 tries. Until you can patch, the advisory suggests memory_limit=-1.
How PHP2Shell breaks, and where you can stop it
Where you can stop it
- memory_limit=-1 removes the predictable out-of-memory abort
- PHP-FPM kills the child instead of running shutdown
- Patch: PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12
Fragnesia (CVE-2026-46300) is a Linux kernel privilege escalation. CISA’s KEV entry notes it can be chained with PHP2Shell to run commands as root. It needs unprivileged user namespaces and loadable esp4/esp6 modules; Ubuntu’s default AppArmor restriction blocks the public exploit.
How Fragnesia reaches root, and where you can stop it
Where you can stop it
- Restrict unprivileged user namespaces (Ubuntu does by default)
- Blacklist the esp4 and esp6 modules
- Patch: kernel fix upstream since 13 May 2026
Node2Shell (CVE-2026-111497) is an out-of-bounds write in the Brotli decoder bundled with Node, fixed in 22.23.4, 24.22.1 and 26.12.1. Node never decodes Brotli on its own (Vercel), so it reaches only apps that decompress attacker Brotli: Express 5 or body-parser 2 parsers, Koa bodyparser, direct node:zlib calls, or fetch() from a hostile server. Offsets are tied to the build: ELLIO found offsets for 24.22.0 produced nothing in 10,000 tries against 22.23.3, and the exploit seen in the wild failed 50 times out of 50. Upgrade the runtime; updating dependencies does not fix it.
How Node2Shell breaks, and where you can stop it
Where you can stop it
- Do not decompress br from untrusted sources
- Upgrading the runtime fixes the decoder; dependency updates do not
- Patch: Node.js 22.23.4, 24.22.1, 26.12.1
Java4Shell, also called Java2Shell (CVE-2026-114938), is a memory write past an array in the JIT-compiled Base64 decoder, fixed on 17 November 2026. CIRCL lists four conditions that must all hold: OpenJDK 17.0.6 or later before the fix, an x86-64 CPU with AVX-512 VBMI (Intel Ice Lake or AMD Zen 4 and newer; ARM is immune), the intrinsic enabled (the default on that hardware), and attacker Base64 reaching java.util.Base64 after the JIT has compiled it. Calif says every target needs its own heap profile. If you cannot patch yet, start the JVM with -XX:-UseBASE64Intrinsics.
How Java4Shell breaks, and where you can stop it
Where you can stop it
- ARM and older x86 CPUs never take this path
- Start the JVM with -XX:-UseBASE64Intrinsics
- Patch: OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1
How they compare with Log4Shell
Log4Shell turned any logged string into a remote code load, and React2Shell exposed every default Next.js App Router app. Both needed no login, one request and no knowledge of the target’s memory, so they worked everywhere at once.
Log4Shell0 failed tries
- Send a string with ${jndi:…} in any logged field
- Server looks it up on the attacker’s LDAP server
- Server loads and runs the attacker’s code
Shell after 1 request
Any logged field. Worked the same on every OS and CPU.
PHP2Shell0 failed tries
- Crafted upload forces PHP out of memory mid-request
- Oversized session cookie leaks worker memory, defeating ASLR
- Forged hash table points its destructor at system()
- Commands run as the web server user
Shell after many tries
Reliable mainly on Apache mod_php. A public exploit got 1 shell in about 24 tries.
Node2Shell0 failed tries
- Your app must decompress attacker-supplied Brotli
- Corrupt decoder state to leak heap memory
- Redirected write, then a ROP chain built for this exact build
- Shell as the service account
Shell after many tries
Only if your app decompresses attacker Brotli. Offsets differ per Node build.
Java4Shell0 failed tries
- Your CPU must have AVX-512 VBMI; ARM is immune
- Warm the JIT with valid Base64 until C2 compiles it
- Groom the heap remotely, pacing requests by TCP ACKs
- Second corruption leaks memory, then write into the code cache
Shell after many tries
x86-64 with AVX-512 VBMI and JDK 17.0.6+ only. Every target needs its own profile.
| Bug | Default config? | Extra conditions | KEV | EPSS |
|---|---|---|---|---|
| Log4Shell | Yes | None | 2021-12-10 | 0.99999 |
| React2Shell | Yes | None | 2025-12-05 | 0.538 |
| PHP2Shell | Reliable only on mod_php | Memory leak, per-build offsets, many tries | 2026-10-26 | 0.451 / 0.208 |
| Fragnesia | Needs unprivileged user namespaces | Local code first | 2026-10-28 | 0.030 |
| Node2Shell | No, the app must decode attacker Brotli | Heap leak, per-build offsets | 2026-10-27 | 0.330 |
| Java4Shell | Only on AVX-512 VBMI hardware | Per-app heap profile, JIT warm-up | Not listed | 0.593 |
Failed attempts also crash the target: a miss kills a PHP worker, a Node process or a JVM, where Log4Shell was one quiet request. Platform hardening adds steps too. SELinux confinement of the PHP worker is why the PAN-OS attackers below needed Fragnesia on top of PHP2Shell.
Identical fleets undo the difficulty
The one confirmed production compromise used a PHP2Shell and Fragnesia chain to root 24 Palo Alto PAN-OS firewalls with 11 version-specific offset profiles. Every firewall on the same PAN-OS version runs the same PHP binary, so each profile covered every box on that version. Public Node2Shell exploits target the official node:24.22.0 image for the same reason, and a supervisor that restarts the process after each crash gives the attacker free retries.
AI speeds up the exploit work
Calif found Java4Shell with OpenAI Codex in about an hour and had a working exploit about two hours later, and Invicti built PHP2Shell and Node2Shell chains with local models. Recomputing offsets for another build is the kind of work a model does well, so calibrating for a fleet gets cheaper (my estimate; I have no measurements).
The preconditions stay where they were: a model cannot add AVX-512 to a server, make an app decode Brotli it never receives, or turn PHP-FPM into mod_php. Count the difficulty as a few extra days to patch, and spend them on the systems the checker above flags.
Open questions
- The sources I read do not show what evidence CISA used to list Node2Shell in KEV.
- The PHP advisory and Calif disagree on whether PHP-FPM can be exploited for code execution.
- No source I found says whether
disable_functionsstops the PHP2Shell chain. - The GreyNoise figures for Java4Shell (261 trigger-shaped requests, zero intrusions) come from Beamreach’s summary, not from GreyNoise directly.