everythingsfine.io

runbook / 003 · Tailwind Resource Group · Customer advisory · Disclosed October 21, 2026

Upgrade Node.js for Node2Shell, and stop Brotli request bodies at the BIG-IP until you do

A bug in the Brotli decoder in Node.js lets crafted compressed data write past a buffer. CISA reports exploitation. Upgrade Node.js to 22.23.4, 24.22.1 or 26.12.1. This page gives you a version check and an iRule that stops Brotli request bodies at the BIG-IP until you upgrade.

CVE
CVE-2026-111497
Fix
Node.js 22.23.4, 24.22.1, 26.12.1
Interim
1 iRule, log-only first; 1 Express setting
Log prefix
n2s:
  1. Summary

    On October 21, 2026, the Node.js project released 22.23.4, 24.22.1 and 26.12.1. The releases correct CVE-2026-111497, which researchers call Node2Shell. Other names for it are Broccoli2Shell and HTTP2Shell.

    The Node.js advisory says this: an invalid block switch in a Brotli stream causes the decoder to write past the end of an eight-byte internal buffer. An attacker who can send Brotli data that an application decompresses with node:zlib can corrupt process memory. The result can be a crash, disclosure of process memory, or remote code execution. No logon is necessary. The bug is in the Google Brotli library, so other software that decodes Brotli is also affected.

    On October 27, 2026, CISA added CVE-2026-111497 to its Known Exploited Vulnerabilities catalog. Node.js rates the issue high. The CVE record gives it CVSS 4.0 9.2, critical.

    Upgrade Node.js to 22.23.4, 24.22.1, 26.12.1 or later, then restart each Node.js process. Until you can do this, this page helps you find the vulnerable runtimes and stop the most direct attack path at the BIG-IP.

  2. Does this apply to you?

    You have more exposure if one or more of these statements is true:

    • You run Node.js 22.x before 22.23.4, 24.x before 24.22.1, or 26.x before 26.12.1.
    • You run an end-of-life Node.js line, for example 20.x, 23.x or 25.x. These lines get no fix.
    • Your application uses Express 5 or body-parser 2. By default, their JSON, raw, text and form parsers decompress a request body that has the header Content-Encoding: br. Any client can send such a request.
    • Your code calls zlib.brotliDecompress(), zlib.brotliDecompressSync() or zlib.createBrotliDecompress() on data from a user, an upload, a queue or a WebSocket.
    • Your application calls fetch() to servers that you do not control. The built-in fetch() decompresses Brotli responses automatically, so a malicious or compromised server can attack the client.
    • Your Node.js comes from a Linux distribution that links it to the system Brotli library. On those systems, the OS brotli package must also be updated.
    • You run other software that decodes Brotli: the Python brotli and brotlicffi packages, Envoy, Bun, or .NET. Their vendors have their own fixes.

    According to Akamai, a bare Node.js HTTP server does not decode Brotli request bodies. The application decides. A server that never decompresses Brotli data from outside and never calls untrusted servers has less exposure. It is still affected, so upgrade it.

    F5 says in article K000163902 that BIG-IP (all modules) and BIG-IQ are not vulnerable. F5 WAF for NGINX is affected. Use F5's own article for NGINX products.

    1. Find each Node.js runtime. Run the version check script below on each host and in each container image. Include build servers and developer tools that run on servers.
    2. Upgrade Node.js. Install 22.23.4, 24.22.1, 26.12.1 or a later release on the same line. Move end-of-life lines to a supported line.
    3. Update the system Brotli library. Do this where the script says system, and on every host that runs other Brotli decoders. Google's fixed releases are 1.0.10, 1.1.1 and 1.2.1. Distributions backport the fix, so use your distribution's advisory.
    4. Restart and rebuild. Restart each Node.js process after the upgrade. Rebuild and deploy each container image. A running process keeps the old code until it restarts.
    5. Optional: add the iRule below to the BIG-IP. Start in log-only mode. It stops Brotli request bodies before they reach the application.
    6. Turn off compressed request bodies in Express. Do this if your clients do not send them.
    7. Limit outbound connections. Permit Node.js servers to connect only to the hosts that they need. This decreases the risk from malicious fetch() responses.
    8. Monitor. See "What to monitor" below.
  3. Find the vulnerable runtimes

    This script finds each Node.js binary and compares its version with the fixed releases. It also shows whether the binary uses the bundled or the system Brotli library. It only reads versions. It sends no network traffic and changes nothing.

    Do not use the Brotli version that Node.js reports to decide. In our tests, the fixed releases report the same Brotli version as the vulnerable ones, because Node.js patched its copy of the library. Use the Node.js version.

    Run it as any user. With no arguments, it checks node on the PATH and, on Linux, the binary of each running node process. To check other binaries, give their paths as arguments. The script exits with status 1 if it finds an affected or end-of-life binary.

    Script n2s_check_node.sh

    n2s_check_node.shDownload
    Show all 82 linesHide 82 lines
    #!/bin/sh
    # Copyright 2026 Tailwind Resource Group
    # SPDX-License-Identifier: Apache-2.0
    # Provided as is, with no warranty. License: https://everythingsfine.io/license/
    #
    # n2s_check_node.sh
    #
    # Report each Node.js binary on this host and whether its version has the
    # fix for CVE-2026-111497 ("Node2Shell"). The script only reads versions.
    # It does not send network traffic and does not change the system.
    #
    # Usage: sh n2s_check_node.sh [/path/to/node ...]
    # With no arguments, it checks "node" on PATH and the binaries of
    # running node processes (Linux /proc only).
    #
    # Fixed releases: 22.23.4, 24.22.1, 26.12.1. Other release lines are
    # end-of-life and get no fix.
    
    status=0
    
    check_one() {
        bin=$1
        [ -x "$bin" ] || return 0
        info=$("$bin" -e 'var v=process.versions,c=(process.config&&process.config.variables)||{};console.log(v.node+" "+(v.brotli||"unknown")+" "+(c.node_shared_brotli===true||c.node_shared_brotli==="true"?"system":"bundled"))' 2>/dev/null) || {
            echo "UNKNOWN   $bin: cannot run it"
            status=1
            return 0
        }
        ver=${info%% *}
        rest=${info#* }
        brotli=${rest%% *}
        source=${rest#* }
        major=${ver%%.*}
        minor=${ver#*.}; minor=${minor%%.*}
        patch=${ver##*.}
        case $major in
            22) fix_minor=23; fix_patch=4 ;;
            24) fix_minor=22; fix_patch=1 ;;
            26) fix_minor=12; fix_patch=1 ;;
            *)
                if [ "$major" -gt 26 ] 2>/dev/null; then
                    echo "CHECK     $bin: node $ver is newer than this script knows; confirm with the Node.js advisory"
                else
                    echo "EOL       $bin: node $ver has no fix; move to a supported release line"
                    status=1
                fi
                return 0 ;;
        esac
        if [ "$minor" -gt "$fix_minor" ] || { [ "$minor" -eq "$fix_minor" ] && [ "$patch" -ge "$fix_patch" ]; }; then
            verdict="FIXED"
        else
            verdict="AFFECTED"
            status=1
        fi
        printf "%-9s %s\n" "$verdict" "$bin: node $ver, brotli $brotli ($source)"
        if [ "$source" = "system" ]; then
            echo "          $bin uses the system Brotli library: also update the OS brotli package"
        fi
    }
    
    if [ $# -gt 0 ]; then
        for b in "$@"; do check_one "$b"; done
    else
        seen=""
        p=$(command -v node 2>/dev/null) && { check_one "$p"; seen="$p"; }
        if [ -d /proc ]; then
            for exe in /proc/[0-9]*/exe; do
                t=$(readlink "$exe" 2>/dev/null) || continue
                case $t in
                    */node|*/nodejs) ;;
                    *) continue ;;
                esac
                case " $seen " in
                    *" $t "*) continue ;;
                esac
                seen="$seen $t"
                check_one "$t"
            done
        fi
        [ -n "$seen" ] || echo "No node binary found on PATH or in running processes."
    fi
    exit $status

    Example output

    text
    AFFECTED  /usr/bin/node: node 22.22.2, brotli 1.1.0 (system)
              /usr/bin/node uses the system Brotli library: also update the OS brotli package
    FIXED     /opt/node/bin/node: node 24.22.1, brotli 1.2.0 (bundled)
    EOL       /srv/legacy/node: node 20.19.5 has no fix; move to a supported release line

    To check a container image, run the script inside a container from that image, or run node --version in it:

    shell
    docker run --rm --entrypoint node example.com/app:latest --version
  4. Stop Brotli request bodies at the BIG-IP

    This iRule examines the Content-Encoding header of each request. If one of the values is br, it writes a log entry. In blocking mode, it also sends HTTP 415 and does not send the request to the application. It reads headers only. It does not collect or log the body.

    The control is the same one that other vendors give for this CVE. F5 gives it for F5 WAF for NGINX in K000163902, and Broadcom gives it for VMware Avi Load Balancer in KB 460545. It stops the attack path that Akamai describes for Express 5 and body-parser 2.

    This iRule does not replace the upgrade. It does not stop Brotli data that reaches the application in other ways: a file upload, a WebSocket message, a queue, or a fetch() response. It only stops request bodies that are marked with Content-Encoding: br.

    Attach it to each virtual server in front of a Node.js application. The virtual server must have an HTTP profile. Our estimate: browsers do not compress request bodies, so blocking mode will usually stop no valid traffic. Some API clients and services can send them. Use log-only mode to make sure.

    iRule n2s_reject_brotli_body

    n2s_reject_brotli_body.tclDownload
    Show all 44 linesHide 44 lines
    # Copyright 2026 Tailwind Resource Group
    # SPDX-License-Identifier: Apache-2.0
    # Provided as is, with no warranty. License: https://everythingsfine.io/license/
    #
    # n2s_reject_brotli_body
    #
    # Tested on BIG-IP 17.5.1.x. Start in log-only mode.
    #
    # Purpose: find, and optionally reject, HTTP requests that send a
    # Brotli-compressed body (Content-Encoding: br) to a Node.js application,
    # until the application runs Node.js 22.23.4, 24.22.1, 26.12.1 or later
    # (CVE-2026-111497, "Node2Shell").
    #
    # This iRule does not replace the upgrade. It does not stop Brotli data
    # that reaches the application in other ways (file uploads, WebSocket
    # messages, queues), and it does not protect fetch() responses.
    #
    # Attach to: each virtual server in front of a Node.js application.
    # Scope: every request. The iRule reads headers only, not the body.
    # Log: /var/log/ltm, prefix "n2s:". The iRule does not log the body.
    
    when RULE_INIT {
        # 1 = log only. 0 = log and reject with HTTP 415.
        set static::n2s_log_only 1
    }
    
    when HTTP_REQUEST priority 50 {
        set n2s_found 0
        foreach n2s_value [HTTP::header values "Content-Encoding"] {
            foreach n2s_token [split [string tolower $n2s_value] ","] {
                if { [string trim $n2s_token " \t"] eq "br" } {
                    set n2s_found 1
                    break
                }
            }
            if { $n2s_found } { break }
        }
        if { !$n2s_found } { return }
    
        log local0.warning "n2s: reason=brotli_request_body client=[IP::client_addr] vs=[virtual name] method=[HTTP::method] path=[HTTP::path] enforce=[expr {!$static::n2s_log_only}]"
        if { !$static::n2s_log_only } {
            HTTP::respond 415 content "Unsupported Media Type" "Content-Type" "text/plain" "Connection" "close"
        }
    }
  5. Turn off compressed request bodies in Express

    If you use Express 5 or body-parser 2 and your clients do not send compressed request bodies, set inflate to false on each body parser. The parser then rejects a compressed body with HTTP 415 and does not decompress it. This also rejects gzip and deflate bodies.

    Express parser settings

    js
    app.use(express.json({ inflate: false }));
    app.use(express.urlencoded({ extended: false, inflate: false }));
    app.use(express.text({ inflate: false }));
    app.use(express.raw({ inflate: false }));

    Use only the parsers that your application already uses. Keep your other options.

  6. How to install, tune, and remove the iRule

    Install

    1. Save a UCS archive of the configuration.
    2. In the Configuration utility, go to Local Traffic > iRules > iRule List. Click Create.
    3. Enter the name n2s_reject_brotli_body. Paste the iRule text. Click Finished.
    4. Go to Local Traffic > Virtual Servers. Open the virtual server. On the Resources tab, click Manage in the iRules area.
    5. Move the iRule to Enabled. Click Finished.
    6. Synchronize the configuration to the other units in the device group.

    Read the log

    shell
    grep 'n2s:' /var/log/ltm

    Each entry gives the client address, the virtual server, the method and the path. Example:

    /var/log/ltm
    n2s: reason=brotli_request_body client=203.0.113.7 vs=/Common/vs_node method=POST path=/api/orders enforce=0
    • If a valid client causes an entry, find out why it sends Brotli bodies. Keep log-only mode on that virtual server until that client stops, or until you upgrade Node.js.
    • If an entry comes from an address that you do not know, record it. See "What to monitor".

    Change to blocking mode

    1. Keep log-only mode for a minimum of one full business day.
    2. Open the iRule. Change set static::n2s_log_only 1 to 0.
    3. Click Update. The new value applies when you save the iRule.
    4. A blocked request gets an HTTP 415 response. On HTTP/1.1 the BIG-IP closes the connection. On HTTP/2 the 415 ends only that request, and the connection stays open.

    Remove

    1. Remove the iRule from each virtual server.
    2. Delete the iRule from the iRule List.
    3. Synchronize the configuration.

    Remove the iRule after each Node.js application behind the virtual server runs a fixed release.

  7. What to monitor

    • Node.js process crashes. Look for unexpected restarts, SIGSEGV, SIGABRT and core files in your process manager, journalctl, or container logs. A crash after a request with a Brotli body is a sign of an attempt.
    • iRule entries. Many n2s: entries from one unknown address can show scanning or an attempt.
    • HTTP 415 responses. An increase after you set inflate: false or change the iRule to blocking mode shows clients that send compressed bodies.
    • Unexpected child processes and outbound connections. A Node.js process that starts a shell, or connects to a host it does not usually use, can show code execution.
    • Runtime inventory. Run the version check script again after each deployment, until no AFFECTED or EOL lines remain.

    If you think a system is compromised, keep the logs and core files, and isolate the host before you make changes. Then contact Tailwind Resource Group.

  8. References

  9. About this advisory

    This page gives the results of our analysis. It is not a statement from the Node.js project, Google, F5 or CISA. The Node.js project confirmed the bug, the affected lines and the fixed releases. CISA confirmed exploitation. We did not reproduce the bug. The version check script is tested with Node.js 22, 24 and 26. We tested the iRule on BIG-IP 17.5.1.x in log-only and blocking mode, over HTTP/1.1, HTTPS and HTTP/2. We did not test the Configuration utility steps or the Express settings. The code is licensed under the Apache License 2.0 and is supplied as it is, with no warranty. You are responsible for tests in your environment. We will update this page when F5 or the Node.js project changes its guidance for this CVE.