Repository navigation
fix(deps): build the json helper with Node 24 - #22
Conversation
npm/json embedded Node v18.20.8, which is end-of-life and vulnerable to CVE-2026-111497 (brotli). pkg ships its own Node runtime, so OS updates never patch it. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
chrip
left a comment
There was a problem hiding this comment.
Approve. Looks good to merge.
I ran the new pkg line from this branch in a container with @yao-pkg/pkg 6.25.0, the current release, which the DocumentServer packaging image installs. It downloads the prebuilt Node v24.22.1 in about 12 seconds, json -p process.version prints v24.22.1, and the helper still reads and edits JSON as before. DocumentServer builds get faster too: with node18, pkg finds no prebuilt binary and compiles Node from source, which takes about 38 of the package step's 49 minutes today.
suggestion: The server has moved to Node 26 since you opened this (Euro-Office/server commit ca5c34a), so node24 no longer matches it as the description says. node26-linux-x64 and node26-linux-arm64 also have prebuilt binaries (v26.12.1). Switch if you want the two in step; node24 is fine as it is.
Assisted-by: ClaudeCode:claude-opus-5-5
npm/jsonin the deb and rpm still embedded Node v18.20.8 (end-of-life, vulnerable to CVE-2026-111497 / brotli). pkg bundles its own Node, so OS updates don't reach it. This setsPKG_TARGETtonode24-linux-{x64,arm64}, matching the server binaries (server#62).jsonstays: postinst, the configure scripts and the jwt/securelink helpers call it ~210 times with JS expressions, so replacing it withjqis a separate change.Check after build:
PKG_EXECPATH=PKG_INVOKE_NODEJS /var/www/euro-office/documentserver/npm/json -p process.versionshould printv24.22.1.Related: DocumentServer#441, DocumentServer#467
AI-assisted, reviewed by me.