<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hieu Nguyen Huy</title>
    <description>The latest articles on DEV Community by Hieu Nguyen Huy (@hiu_nguynhuy_09af3ae03).</description>
    <link>https://dev.to/hiu_nguynhuy_09af3ae03</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1705912%2F8ea23e5b-f552-4cdf-8268-ec6968f7816e.jpg</url>
      <title>DEV Community: Hieu Nguyen Huy</title>
      <link>https://dev.to/hiu_nguynhuy_09af3ae03</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hiu_nguynhuy_09af3ae03"/>
    <language>en</language>
    <item>
      <title>Why the 2026 "2Shell" and "2Root" bugs are hard to exploit</title>
      <dc:creator>Hieu Nguyen Huy</dc:creator>
      <pubDate>Sat, 28 Nov 2026 04:14:05 +0000</pubDate>
      <link>https://dev.to/hiu_nguynhuy_09af3ae03/why-the-2026-2shell-and-2root-bugs-are-hard-to-exploit-i49</link>
      <guid>https://dev.to/hiu_nguynhuy_09af3ae03/why-the-2026-2shell-and-2root-bugs-are-hard-to-exploit-i49</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;my blog&lt;/a&gt;, where the diagrams below are interactive.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;KEV data is from CISA catalog version 2026.11.25; EPSS scores are from FIRST, dated 26 November 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check first
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;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?&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;Weight fleets heavily. A hard bug on one unique server can wait a cycle; the same bug on a thousand identical pods cannot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frid08lcvy3w78zg027cm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frid08lcvy3w78zg027cm.png" alt="Checklist of stack conditions with a patch-first verdict for each bug" width="800" height="712"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A checker that ranks the four bugs for your stack. Here: Apache mod_php, a Node service that decodes Brotli, and unprivileged user namespaces allowed. &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;Interactive version on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The three bugs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;PHP2Shell&lt;/strong&gt; (&lt;a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w" rel="noopener noreferrer"&gt;CVE-2026-109618 and CVE-2026-109619&lt;/a&gt;) is a use-after-free when PHP runs out of memory mid-request, triggered by a crafted upload; PHP 8.1 and older get no fix. The reliable path is Apache mod_php. Even on identical fresh containers, a public exploit needed about &lt;a href="https://www.intel471.com/blog/testing-a-php2shell-exploit-in-the-era-of-ai-hallucinated-pocs" rel="noopener noreferrer"&gt;24 tries&lt;/a&gt; for one shell. Until you can patch, the advisory suggests &lt;code&gt;memory_limit=-1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmqf3xi9zhhgetim39hfn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmqf3xi9zhhgetim39hfn.png" alt="PHP2Shell flow from upload to code execution, with two defender cut points" width="799" height="218"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Where PHP2Shell breaks, and where you can stop it. &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;Interactive version on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fragnesia&lt;/strong&gt; (&lt;a href="https://www.tenable.com/blog/fragnesia-cve-2026-46300-faq-about-new-linux-kernel-xfrm-esp-in-tcp-priv-esc" rel="noopener noreferrer"&gt;CVE-2026-46300&lt;/a&gt;) is a Linux kernel privilege escalation that CISA notes can be chained with PHP2Shell to get root. It needs unprivileged user namespaces and loadable &lt;code&gt;esp4&lt;/code&gt;/&lt;code&gt;esp6&lt;/code&gt; modules; Ubuntu's default AppArmor restriction blocks the public exploit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frs7rdcukyq8vfppi7p9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frs7rdcukyq8vfppi7p9t.png" alt="Fragnesia flow from a web shell to root, with two defender cut points" width="799" height="218"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Where Fragnesia breaks, and where you can stop it. &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;Interactive version on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Node2Shell&lt;/strong&gt; (&lt;a href="https://nodejs.org/en/blog/vulnerability/october-2026-security-releases" rel="noopener noreferrer"&gt;CVE-2026-111497&lt;/a&gt;) is an out-of-bounds write in the Brotli decoder bundled with Node. Node never decodes Brotli on its own, so it reaches only apps that decompress attacker Brotli: Express 5 or body-parser 2, Koa bodyparser, direct &lt;code&gt;node:zlib&lt;/code&gt; calls, or &lt;code&gt;fetch()&lt;/code&gt; from a hostile server. Offsets are tied to the build: offsets for 24.22.0 produced nothing in &lt;a href="https://ellio.tech/en/blog/node2shell-cve-2026-111497-rce-on-stock-nodejs-builds/" rel="noopener noreferrer"&gt;10,000 tries&lt;/a&gt; against 22.23.3. Upgrade the runtime; updating dependencies does not fix it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1qt03gvjg1wsu9bpure5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1qt03gvjg1wsu9bpure5.png" alt="Node2Shell flow from a hostile Brotli body to memory corruption, with two defender cut points" width="799" height="231"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Where Node2Shell breaks, and where you can stop it. &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;Interactive version on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java4Shell&lt;/strong&gt;, also called Java2Shell (&lt;a href="https://calif.io/java4shell" rel="noopener noreferrer"&gt;CVE-2026-114938&lt;/a&gt;), is a memory write past an array in the JIT-compiled Base64 decoder. It needs all four of these (&lt;a href="https://www.circl.lu/pub/tr-104/" rel="noopener noreferrer"&gt;CIRCL&lt;/a&gt;): unpatched OpenJDK 17.0.6 or later, an x86-64 CPU with AVX-512 VBMI (ARM is immune), the intrinsic enabled (the default on that hardware), and attacker Base64 reaching &lt;code&gt;java.util.Base64&lt;/code&gt; after the JIT has compiled it. Each target also needs its own heap profile. If you cannot patch yet, start the JVM with &lt;code&gt;-XX:-UseBASE64Intrinsics&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flr6dpmhzflbqqhcvu7da.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flr6dpmhzflbqqhcvu7da.png" alt="Java4Shell flow from attacker Base64 to a write past the array, with two defender cut points" width="799" height="218"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Where Java4Shell breaks, and where you can stop it. &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;Interactive version on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How they compare with Log4Shell
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://nvd.nist.gov/vuln/detail/CVE-2021-44228" rel="noopener noreferrer"&gt;Log4Shell&lt;/a&gt; turned any logged string into a remote code load, and &lt;a href="https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components" rel="noopener noreferrer"&gt;React2Shell&lt;/a&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq1i74qttgv7gfm3a174i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq1i74qttgv7gfm3a174i.png" alt="Four lanes comparing the steps and failed tries for Log4Shell, PHP2Shell, Node2Shell and Java4Shell" width="800" height="916"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Steps an attacker has to get right for each bug. On the blog this plays as an animation, including the failed tries. &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;Interactive version on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Bug&lt;/th&gt;
&lt;th&gt;Default config?&lt;/th&gt;
&lt;th&gt;Extra conditions&lt;/th&gt;
&lt;th&gt;KEV&lt;/th&gt;
&lt;th&gt;EPSS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Log4Shell&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;2021-12-10&lt;/td&gt;
&lt;td&gt;0.99999&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;React2Shell&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;2025-12-05&lt;/td&gt;
&lt;td&gt;0.538&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PHP2Shell&lt;/td&gt;
&lt;td&gt;Reliable only on mod_php&lt;/td&gt;
&lt;td&gt;Memory leak, per-build offsets, many tries&lt;/td&gt;
&lt;td&gt;2026-10-26&lt;/td&gt;
&lt;td&gt;0.451 / 0.208&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fragnesia&lt;/td&gt;
&lt;td&gt;Needs unprivileged user namespaces&lt;/td&gt;
&lt;td&gt;Local code first&lt;/td&gt;
&lt;td&gt;2026-10-28&lt;/td&gt;
&lt;td&gt;0.030&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node2Shell&lt;/td&gt;
&lt;td&gt;No, the app must decode attacker Brotli&lt;/td&gt;
&lt;td&gt;Heap leak, per-build offsets&lt;/td&gt;
&lt;td&gt;2026-10-27&lt;/td&gt;
&lt;td&gt;0.330&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Java4Shell&lt;/td&gt;
&lt;td&gt;Only on AVX-512 VBMI hardware&lt;/td&gt;
&lt;td&gt;Per-app heap profile, JIT warm-up&lt;/td&gt;
&lt;td&gt;Not listed&lt;/td&gt;
&lt;td&gt;0.593&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identical fleets undo the difficulty
&lt;/h2&gt;

&lt;p&gt;The one confirmed production compromise used a PHP2Shell and Fragnesia chain to &lt;a href="https://dreamgroup.com/blog/chained-php2shell-exploit-roots-25-servers" rel="noopener noreferrer"&gt;root 24 Palo Alto PAN-OS firewalls&lt;/a&gt; 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 &lt;code&gt;node:24.22.0&lt;/code&gt; image for the same reason, and a supervisor that restarts the process after each crash gives the attacker free retries.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmhiq9t6x8mf29pq775p3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmhiq9t6x8mf29pq775p3.png" alt="Grid of 96 hosts in two builds, each build covered by one exploit profile" width="799" height="497"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;One exploit profile per build: 96 hosts in 2 builds need only 2 calibrations. On the blog the sliders are live. &lt;a href="https://greyscope.fyi/blog/why-2026-2shell-bugs-are-hard-to-exploit/" rel="noopener noreferrer"&gt;Interactive version on my blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  AI speeds up the exploit work
&lt;/h2&gt;

&lt;p&gt;Calif found Java4Shell with OpenAI Codex in about an hour and &lt;a href="https://calif.io/java4shell" rel="noopener noreferrer"&gt;had a working exploit about two hours later&lt;/a&gt;, and &lt;a href="https://www.invicti.com/blog/security-labs/exploiting-php2shell-node2shell-rce-with-local-ai-models" rel="noopener noreferrer"&gt;Invicti built PHP2Shell and Node2Shell chains with local models&lt;/a&gt;. 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).&lt;/p&gt;

&lt;p&gt;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 checklist at the top points to.&lt;/p&gt;

</description>
      <category>security</category>
      <category>appsec</category>
      <category>vulnerabilities</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
