Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

v1.4.4: refuse Brotli responses; Node 24.22.1 for new installs and images - #47

Merged
SashaMIT merged 3 commits into
mainfrom
sec/node-oct-2026-1.4.4
Oct 21, 2026
Merged

SashaMIT merged 3 commits into
mainfrom
sec/node-oct-2026-1.4.4

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 21, 2026 •

Copy link
Copy Markdown

Response to the Node.js October 2026 security releases. The worst issue for PC2 is CVE-2026-111497 (HIGH), a Brotli decoder out-of-bounds write that any br-encoded fetch response can reach. The fixes are in 24.22.1, 22.23.4 and 26.12.1 only. Node 20, which the installers have put on every Linux and Jetson node, gets no fix. The in-app updater never changes a node's Node runtime, so this has to be fixed in pc2-node's own code to reach existing nodes.

1. Brotli guard (works on any Node version)

  • New pc2-node/src/utils/refuseBrotli.ts, an undici interceptor that:
    • removes br from Accept-Encoding, so normal servers reply with gzip or identity,
    • aborts any response that is Content-Encoding: br anyway, before Node decodes it.
  • It's composed into the global fetch dispatcher (installOutboundTlsPolicy) and into /api/http's per-request pinned dispatcher.
  • pc2-node's own code doesn't use axios, node-fetch, got or zlib's Brotli functions, so fetch is the only path.
  • Tested on Node 20, 22 and 24 against a local hostile server: plain and gzip pass, br is refused, and br is never sent. Live checks against Cloudflare, Google, GitHub, npm, both supernodes, zzz and ipfs.ela.city all return 200 over gzip.

2. Node 24 for new installs and images

  • node:24.22.1-alpine for the pc2-node, docker/pc2 and web-gateway images, and node:24.22.1-bookworm-slim for enm-server. The tags are pinned exactly because the floating node:24-alpine tag hadn't been repointed yet.
  • CI (smoke, enm bundle, docker) uses 24.22.1.
  • install-arm.sh and supernode-bootstrap.sh use setup_24.x and require Node 24 or newer. install-wsl.sh and start-local.sh use nvm install 24 and default to 24.
  • enm-server's fallback Node download is v24.22.1 instead of the end-of-life v23.10.0. It's still checked against SHASUMS256.
  • test:unit now lists the test files, because Node 24's node --test doesn't accept a bare directory. It runs the same 60 tests on 20 and 24.
  • engines stays at >=20.18.0, so existing Node 20 nodes don't get install warnings.

Version 1.4.4 and a CHANGELOG entry.

Do not merge until it has been tested on zzz.ela.city running Node 24.22.1.

Also in this PR

  • pc2-node/package-lock.json gains 52 missing optional platform entries (esbuild, sharp, @napi-rs/canvas). npm 11, which ships with Node 24, refuses npm ci without them. No existing version changes.
  • tls-trust.test.js no longer assumes Node bundles emSign ECC G3, because Node 24.22.1 dropped it.

Testing

  • zzz.ela.city (Jetson, arm64) runs this branch on Node 24.22.1:
    • Node is the official tarball, checked against SHASUMS256, in a root-owned /opt and linked into /usr/local/bin, so pc2, npm and the in-app updater all use 24.22.1.
    • canvas was rebuilt for Node 24. sqlite, node-pty and node-datachannel load unchanged.
    • After the restart, health, database, IPFS, websocket, terminal, ESC RPC, the WireGuard tunnel, supernode discovery and cluster-pin are all fine, and outbound requests send Accept-Encoding: gzip, deflate.
  • CI on Node 24.22.1: linux-x64, linux-arm64, Docker, the Raspberry Pi simulation and the install-arm smoke all pass.
  • windows-x64 (experimental, not gating) fails: canvas 2.11.2 has no Node 24 Windows build, so tsc can't resolve it. Supported Linux installs compile it, because the ARM and WSL installers add the Cairo headers. Moving to @napi-rs/canvas (already the planned Phase 2 follow-up) would fix this.

….4.4)

Node.js Oct 2026 security release: CVE-2026-111497 (Brotli decoder OOB
write, HIGH) is reachable through any br-encoded fetch response, and
Node 20 gets no fix.

- Global fetch dispatcher and /api/http stop advertising br and abort
  br-encoded responses before decoding (works on any Node version).
- Docker images node:24.22.1; installers/bootstrap install Node 24;
  CI on 24.22.1; enm-server fallback v24.22.1 (was EOL v23.10.0).
- test:unit lists test files so it runs on Node 24.
- engines stays >=20.18.0 so existing nodes are unaffected.
npm 11 (bundled with Node 24) refuses npm ci when the lockfile lacks
other platforms' optional packages. Adds 52 @esbuild/@img/@napi-rs
entries; no existing version changes.
Node 24.22.1 dropped it from its CA store, so assert the filter removes
exactly the distrusted roots the running Node ships.
@SashaMIT
SashaMIT merged commit ff6761f into main Oct 21, 2026
19 of 28 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant