What you should do?
1. Find Node.js across your estate
- Run node –version on servers, build agents and CI/CD runners. For container images, run docker run –rm < image > node –version, because package inventories can miss runtimes bundled inside images.
- The software inventory in Microsoft Defender Vulnerability Management can help find Node.js on devices onboarded to Defender for Endpoint. It won’t see containers or applications on managed hosting platforms.
- Managed platforms such as Azure App Service, Azure Functions and other hosting providers run their own Node.js runtime and can lag behind the official release. Check which version they’re running.
- If an external developer, web agency or software vendor builds or hosts your applications, ask them to confirm whether they use Node.js and when they’ll update. These often sit outside the environments Chorus CSOC monitors.
2. Prioritise the most exposed applications
Ask your developers to check for the following, then update matching applications first:
- Express 5 or body-parser 2.x, using npm ls express body-parser.
- Code or dependencies that call brotliDecompress or createBrotliDecompress.
- Outbound fetch() calls to servers you don’t control, including webhooks and user-supplied URLs.
3. Update Node.js
Update to the fixed version for your release line, or any newer patch release of that line:
Node.js 26.x to 26.12.1
Node.js 24.x to 24.22.1
Node.js 22.x to 22.23.4
Node.js 25.x, 23.x, 20.x and older – No fix, move to a supported line
Bun – 1.4.4 or newer
- Containers: rebuild and redeploy every image. An image pinned to an older tag, such as node:24.22.0, stays vulnerable however often it’s rebuilt, so move the pin to a fixed version.
- Linux distribution packages: Node.js installed from Debian, Ubuntu, RHEL, Alpine or similar may use the system Brotli library instead, so the fix arrives through your distribution’s brotli package. Check your distribution’s security advisory, as some hadn’t published fixes at the time of writing.
- Windows and other installs: download the updated installer from the Node.js downloads page, then restart the services that use it.
- Other software that bundles the Brotli library also needs updating. Brotli fixed the issue in versions 1.0.10, 1.1.1 and 1.2.1.
4. If you can’t update immediately
The Node.js project hasn’t published a workaround. These stopgaps reduce exposure, but they don’t remove the flaw, so please update as soon as you can.
- Block Brotli-encoded requests: reject incoming requests with a Content-Encoding: br header at your web application firewall, reverse proxy, load balancer or application middleware. Azure Application Gateway and Azure Front Door WAF custom rules can match on request headers. Make sure the rule targets Content-Encoding, not Accept-Encoding, which browsers send on almost every request.
- Limit outbound connections: blocking inbound requests doesn’t protect against malicious responses to fetch() calls. Where possible, restrict Node.js applications to the outbound destinations they need.
5. Reduce how exposed your web applications are
This is a good time to review every internet-facing web application, not just those affected by Node2Shell. Each step below makes it harder for an attacker to reach your application code in the first place.
- Decide whether it needs to be public: many internal tools, including those built with AI coding tools, are only used by staff. Taking them off the internet with Microsoft Entra Private Access, Entra Application Proxy or a private endpoint means attackers can’t reach them at all.
- Require sign-in first: if staff need to reach an application over the internet, make them sign in with Microsoft Entra ID before any request gets through to it. Azure App Service and Azure Container Apps have this built in, and Entra Application Proxy does the same for applications hosted elsewhere. Set it to require authentication, limit access to the users or groups who need it, apply Conditional Access policies such as MFA, and check there are no exceptions that let unauthenticated requests through.
- Protect public applications with a WAF: applications that must be open to anyone should sit behind a web application firewall, such as Azure Application Gateway or Azure Front Door, with managed rule sets turned on.
These measures block attacks that arrive in incoming requests. They don’t protect against malicious responses to requests your application makes itself, so updating Node.js is still essential.