Skip to content

fix(deps): build the json helper with Node 24 - #22

Merged
juliusknorr merged 1 commit into
mainfrom
fix/node24-pkg
Nov 13, 2026
Merged

juliusknorr merged 1 commit into
mainfrom
fix/node24-pkg

Conversation

@juliusknorr

Copy link
Copy Markdown
Member

npm/json in 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 sets PKG_TARGET to node24-linux-{x64,arm64}, matching the server binaries (server#62).

json stays: postinst, the configure scripts and the jwt/securelink helpers call it ~210 times with JS expressions, so replacing it with jq is a separate change.

Check after build: PKG_EXECPATH=PKG_INVOKE_NODEJS /var/www/euro-office/documentserver/npm/json -p process.version should print v24.22.1.

Related: DocumentServer#441, DocumentServer#467

AI-assisted, reviewed by me.

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 chrip left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@juliusknorr
juliusknorr merged commit 051602a into main Nov 13, 2026
2 checks passed
@juliusknorr juliusknorr mentioned this pull request Nov 16, 2026
47 of 49 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants