From 2a6e307f16321f7dd4c0c04abb51d05ea5fcece6 Mon Sep 17 00:00:00 2001 From: wtclaude Date: Mon, 26 Oct 2026 10:00:02 -0500 Subject: [PATCH] fix(docker): move the app and bot images to Node 22.23.4 (Node2Shell) CVE-2026-111497 ("Node2Shell") is an out-of-bounds write in the Brotli decoder Node bundles; it was fixed on 2026-10-21 in 22.23.4, 24.22.1 and 26.12.1. Both images were on node:20-alpine, and Node 20 is past end of life, so it gets no fix. The site is not reachable through the main path (Express 4 / body-parser 1.20 refuse a `br` request body with 415, and nothing calls the zlib Brotli API), but fetch() decodes Brotli responses and the runtime itself was unpatched. Pin the exact patched version so a floating tag cannot hold an old build, and run CI on the same version the image ships. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY --- .gitea/workflows/pr-checks.yml | 6 +++--- Dockerfile | 2 +- README.md | 5 +++-- bot/Dockerfile | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/pr-checks.yml b/.gitea/workflows/pr-checks.yml index 06251e5..5b7b261 100644 --- a/.gitea/workflows/pr-checks.yml +++ b/.gitea/workflows/pr-checks.yml @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.23.4 cache: npm cache-dependency-path: server/package-lock.json - name: Check core names no module identifier @@ -90,7 +90,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.23.4 cache: npm cache-dependency-path: client/package-lock.json - name: Install client deps @@ -113,7 +113,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.23.4 cache: npm cache-dependency-path: bot/package-lock.json - name: Install bot deps diff --git a/Dockerfile b/Dockerfile index 0131633..1c62b0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:22.23.4-alpine WORKDIR /app diff --git a/README.md b/README.md index 306d44d..12d1058 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ flowchart TB | Layer | Tech | |---|---| -| Backend | Node.js 20+, Express 4, `mariadb` driver (parameterized SQL, no ORM) | +| Backend | Node.js 22 (images pin 22.23.4), Express 4, `mariadb` driver (parameterized SQL, no ORM) | | Auth | Session service over JWT: httpOnly cookie (web) + bearer access/refresh tokens (mobile), bcrypt hashing, optional TOTP 2FA (`speakeasy` + `qrcode`), pluggable OAuth2/OIDC SSO (built-in Google & Discord + generic) | | Database | MariaDB 11 (own container) | | Frontend | React 18, Vite 5, React Router 6 | @@ -196,7 +196,8 @@ website/ ## Prerequisites -- **Node.js 20+** and npm (Node 22/24 are fine). +- **Node.js 22.23.4+** (or 24.22.1+) and npm. Older builds carry the Node2Shell Brotli bug + (CVE-2026-111497), and Node 20 is past end of life. - **Docker Desktop** (for MariaDB, and for the full Compose deploy). --- diff --git a/bot/Dockerfile b/bot/Dockerfile index 22cc939..2d8a920 100644 --- a/bot/Dockerfile +++ b/bot/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:22.23.4-alpine WORKDIR /app/bot