<?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: Bogdan Ionita</title>
    <description>The latest articles on DEV Community by Bogdan Ionita (@bogdan_ionita_3397390458b).</description>
    <link>https://dev.to/bogdan_ionita_3397390458b</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%2F4215308%2F52229885-6fc8-4a4a-b81b-f4d02b104a2c.jpg</url>
      <title>DEV Community: Bogdan Ionita</title>
      <link>https://dev.to/bogdan_ionita_3397390458b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bogdan_ionita_3397390458b"/>
    <language>en</language>
    <item>
      <title>Node2Shell (CVE-2026-111497): which Node.js versions fix it and where Node hides</title>
      <dc:creator>Bogdan Ionita</dc:creator>
      <pubDate>Thu, 29 Oct 2026 12:43:48 +0000</pubDate>
      <link>https://dev.to/bogdan_ionita_3397390458b/node2shell-cve-2026-111497-which-nodejs-versions-fix-it-and-where-node-hides-5bd4</link>
      <guid>https://dev.to/bogdan_ionita_3397390458b/node2shell-cve-2026-111497-which-nodejs-versions-fix-it-and-where-node-hides-5bd4</guid>
      <description>&lt;p&gt;Node2Shell is the name researchers gave CVE-2026-111497, a flaw in the Brotli decoder that ships inside Node.js. On 21 October 2026 the Node.js project fixed it in 22.23.4, 24.22.1 and 26.12.1. An app that decompresses Brotli data someone else can supply, such as a compressed request body or a response fetched from another server, can crash, leak memory or run an attacker's code. The fix is in Node.js itself, so &lt;code&gt;npm update&lt;/code&gt; doesn't apply it: the runtime has to be upgraded everywhere it runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Node2Shell is
&lt;/h2&gt;

&lt;p&gt;Brotli is a compression format that web servers and browsers use alongside gzip. Node.js bundles a Brotli decoder in &lt;code&gt;node:zlib&lt;/code&gt;. The Node.js advisory describes the bug: an invalid block switch in a compressed stream was treated as a temporary need for more input instead of a format error, so the decoder kept appending bytes to an eight-byte internal buffer and wrote past its end. Memory corruption like that can crash the process, leak memory, or let an attacker run code.&lt;/p&gt;

&lt;p&gt;Node.js rates it high and says it permits remote code execution. It was reported by OpenAI Codex Security. Imperva's researchers then reproduced it as code execution without authentication, and proof-of-concept code is public, so treat every unpatched Node.js service that handles outside data as a target.&lt;/p&gt;

&lt;h2&gt;
  
  
  Are you exposed?
&lt;/h2&gt;

&lt;p&gt;A Node.js process is exposed when it, or a library it uses, decompresses Brotli data that an attacker controls. Imperva tested two common ways that happens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Incoming requests.&lt;/strong&gt; Express 5 and body-parser 2 decompress request bodies sent with &lt;code&gt;Content-Encoding: br&lt;/code&gt;, because body-parser's &lt;code&gt;inflate&lt;/code&gt; option is on by default. So an app with &lt;code&gt;app.use(express.json())&lt;/code&gt; can be reached by a single crafted request, before any login.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outgoing requests.&lt;/strong&gt; Node's built-in &lt;code&gt;fetch()&lt;/code&gt; asks for and decompresses Brotli responses on its own. Any server your code calls that an attacker controls or has compromised can reach the decoder: webhooks you call back, link previews, scrapers, AI agents that fetch the pages a user gives them, health checks of other sites.&lt;/p&gt;

&lt;p&gt;Code that calls the Brotli functions in &lt;code&gt;node:zlib&lt;/code&gt; directly on outside data is exposed the same way. Firewalls in front of your app only see the first path: they can't inspect what your code fetches from elsewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which versions fix it
&lt;/h2&gt;

&lt;p&gt;Each supported Node.js line has one release with the fix (the table below). The same release also fixes nine other vulnerabilities, including three TLS certificate and DNS bugs rated high, so it's worth taking even if your app never touches Brotli.&lt;/p&gt;

&lt;p&gt;Node.js 20 and older get no fix: they're past end of life, and the Node.js project says end-of-life versions are always affected when a security release ships. Bun, which bundles its own Brotli decoder, fixed the same flaw in 1.4.4.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Node.js hides
&lt;/h2&gt;

&lt;p&gt;The upgrade has to reach every copy of Node that runs your code, and there are usually more than one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Container images.&lt;/strong&gt; A Dockerfile pinned to an exact version, such as &lt;code&gt;node:24.22.0&lt;/code&gt;, stays vulnerable however often you rebuild it: move the pin to 24.22.1 or later. Base images that bundle their own Node (browser-testing images, for example) pin whatever was current when they were built, so upgrade Node inside them too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Servers and CI.&lt;/strong&gt; Node installed with nvm, a package manager or a CI setup action is upgraded there, then the service restarted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hosting platforms.&lt;/strong&gt; Vercel deployed firewall rules against the incoming path for every project on 21 October and manages patch versions for its Node.js 22.x and 24.x runtimes, so those projects need no version change. Projects still on Node.js 20 must switch to 22.x or 24.x and redeploy. Vercel also notes its firewall doesn't cover responses your functions fetch from other servers. On other hosts, check the platform's own notice for which Node version your functions run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apps built with AI.&lt;/strong&gt; If an AI app builder or coding agent wrote your app's server code, the question is the same: which runtime runs it, and at which version. See &lt;a href="https://www.relvato.com/ai-built-apps" rel="noopener noreferrer"&gt;monitoring for AI-built apps&lt;/a&gt; for what else to watch once it's live.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check
&lt;/h2&gt;

&lt;p&gt;Run &lt;code&gt;node --version&lt;/code&gt; on laptops, CI runners and servers, and &lt;code&gt;docker run --rm &amp;lt;image&amp;gt; node --version&lt;/code&gt; for each container image. In a running service you can log &lt;code&gt;process.version&lt;/code&gt; at startup. Anything below the fixed release for its line, or on Node.js 20 or older, needs upgrading.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you can't update today
&lt;/h2&gt;

&lt;p&gt;Upgrading is the fix. Until it's rolled out, you can narrow the incoming path: refuse requests with &lt;code&gt;Content-Encoding: br&lt;/code&gt; at your proxy or firewall, or set &lt;code&gt;inflate: false&lt;/code&gt; on body-parser and &lt;code&gt;express.json()&lt;/code&gt;, which rejects every compressed request body (check first that none of your clients send them).&lt;/p&gt;

&lt;p&gt;There's no setting that protects the outgoing path, because a malicious server can send a Brotli response whatever your code asks for. Avoid fetching untrusted URLs from unpatched services until they're upgraded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Runtimes with the Node2Shell fix
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Runtime&lt;/th&gt;
&lt;th&gt;Fixed in&lt;/th&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Node.js 26&lt;/td&gt;
&lt;td&gt;26.12.1&lt;/td&gt;
&lt;td&gt;Current release line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node.js 24&lt;/td&gt;
&lt;td&gt;24.22.1&lt;/td&gt;
&lt;td&gt;LTS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node.js 22&lt;/td&gt;
&lt;td&gt;22.23.4&lt;/td&gt;
&lt;td&gt;LTS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node.js 20 and older&lt;/td&gt;
&lt;td&gt;No fix&lt;/td&gt;
&lt;td&gt;End of life: upgrade to 22 or 24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bun&lt;/td&gt;
&lt;td&gt;1.4.4&lt;/td&gt;
&lt;td&gt;Bundles its own Brotli decoder&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Questions, answered
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does npm update fix Node2Shell?
&lt;/h3&gt;

&lt;p&gt;No. The flaw is in Node.js itself, not in a package, so updating dependencies doesn't change it. Upgrade the Node.js runtime to 22.23.4, 24.22.1 or 26.12.1 or newer wherever your code runs, then restart or redeploy.&lt;/p&gt;

&lt;h3&gt;
  
  
  I don't use Express. Am I safe?
&lt;/h3&gt;

&lt;p&gt;Not necessarily. Node's built-in fetch() decompresses Brotli responses by default, so code that fetches from servers you don't control is exposed whatever framework you use. Upgrade Node anyway.&lt;/p&gt;

&lt;h3&gt;
  
  
  My app is on Vercel. Do I need to do anything?
&lt;/h3&gt;

&lt;p&gt;On Node.js 22.x or 24.x, Vercel manages the patch version and has firewall rules against malicious request bodies, so no version change is needed. On Node.js 20, switch to 22.x or 24.x and redeploy. Vercel's firewall doesn't cover responses your functions fetch from other servers.&lt;/p&gt;

&lt;h3&gt;
  
  
  I'm on Node.js 20 or 18. What now?
&lt;/h3&gt;

&lt;p&gt;They get no fix: both are past end of life. Upgrade to Node.js 22 or 24, test, and redeploy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does a web application firewall protect me?
&lt;/h3&gt;

&lt;p&gt;Only against crafted requests coming in. It can't see the responses your code fetches from other servers, which is the other way in. Rules buy time; the upgrade is the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/en/blog/vulnerability/october-2026-security-releases" rel="noopener noreferrer"&gt;Node.js — Wednesday, October 21, 2026 Security Releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.imperva.com/blog/node2shell-from-brotli-data-to-remote-code-execution/" rel="noopener noreferrer"&gt;Imperva — Node2Shell: From Brotli Data to Remote Code Execution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vercel.com/kb/bulletin/node-js-security-advisory" rel="noopener noreferrer"&gt;Vercel — Node.js security advisory: Brotli decoder RCE (CVE-2026-111497)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.aikido.dev/blog/node2shell-nodejs-brotli-rce-cve-2026-111497" rel="noopener noreferrer"&gt;Aikido — Node2Shell: Node.js Brotli vulnerability allows remote code execution and the fix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/expressjs/body-parser" rel="noopener noreferrer"&gt;body-parser — the inflate option (expressjs/body-parser)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/oven-sh/bun/pull/46351" rel="noopener noreferrer"&gt;Bun — brotli: reject invalid block switch (CVE-2026-111497), oven-sh/bun #46351&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>node</category>
      <category>security</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
