Repository navigation
fix: pin patched Node/Bun/Chrome and raise Node floor for Brotli CVE-2026-111497 - #5
Open
teamkareem wants to merge 3 commits into
Open
teamkareem wants to merge 3 commits into
teamkareem wants to merge 3 commits into
Conversation
Co-authored-by: Kareem <teamkareem@users.noreply.github.com>
4 of 5 tasks
…111497) Co-authored-by: Kareem <teamkareem@users.noreply.github.com>
Co-authored-by: Kareem <teamkareem@users.noreply.github.com>
Fallow audit reportFound 2 findings. Dead code (1)
Health (1)
Generated by fallow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remediation for CVE-2026-111497 / GHSA-9v8h-qqgm-4m35, a critical out-of-bounds write in Google Brotli's decoder (1.0.3–1.2.0). This PR does three things:
^22.23.4 || ^24.22.1 || >=26.12.1(approved by Kareem).hyperframes doctorstays runnable so users can diagnose the problem.Why
packages/cli/src/docker/Dockerfile.render(the imagehyperframes render --dockerbuilds) used the floatingnode:22-bookworm-slimtag, so a cached or stale base could ship a vulnerable Node. The repo had other floating or vulnerable pins too. The publishedengines.node: ">=22"also allowed every vulnerable 22.x release, plus Node 23 and 25, which never got the fix.enginesis only advisory in npm, so the CLI also needs to check at startup.How
1. Pins
packages/cli/src/docker/Dockerfile.rendernode:22.23.4-bookworm-slim.libbrotli1is installed explicitly.libbrotli1is older than1.0.9-2+deb12u1(the bookworm-security fix) orchromiumis older than 148.chrome-headless-shell@stableis left as-is. It currently resolves to 156, which is patched.Dockerfile.testnode:22.23.4-bookworm-slim.bun-v1.4.4.chrome-headless-shell@148.0.7778.167pin stays unchanged. It's already patched, so the golden baselines don't need regenerating.examples/k8s-jobs/Dockerfile.examplenode:22.23.4-bookworm-slim.bun@1.4.4.chrome-headless-shellmoves from 131.0.6778.139 (vulnerable) to 148.0.7778.167, the versionDockerfile.testuses..github/actions/preflight/action.ymland.github/workflows/{ci,catalog-previews,docs,player-perf,preview-regression,windows-render}.yml:node-version: 22becomes22.23.4. Withoutcheck-latest, setup-node can pick an older 22.x that's already cached on the runner..github/workflows/publish.yml:node-version: 24becomes24.22.1.2. Node floor
engines.nodegoes from>=22to^22.23.4 || ^24.22.1 || >=26.12.1inpackages/{cli,engine,producer,aws-lambda}/package.json. These are all the published packages that declareengines.README.md(requirements line and node badge)packages/{cli,engine,producer}/README.mddocs/quickstart.mdxdocs/packages/cli.mdxdocs/guides/{claude-design-hyperframes.md,copilot-cli.mdx,open-design.mdx}skills/hyperframes-cli/SKILL.md3. Runtime enforcement
New
packages/cli/src/utils/nodeVersion.ts. This is the single source of truth forSUPPORTED_NODE_RANGE, the range check, and the CVE message. It's a dependency-free module, so the startup check doesn't importdoctorand its browser/telemetry dependencies on every call.hyperframes doctoruses the same module.doctor.tsimports the shared check and re-exportsSUPPORTED_NODE_RANGE. A test checks that all fourpackage.jsonengines.nodevalues equal that constant, so code,doctorandenginescan't drift apart.packages/cli/src/cli.tsexits early on an unsupported runtime. The check runs right after the--versionfast path and before.envloading, telemetry, update checks or any command. On an unsupported runtime it prints this to stderr and exits 1:Exemptions:
doctoris exempt, and its Node.js row shows ✗ with the same message.--versionstill prints, because it runs before the check. Everything else is blocked, including barehyperframesand--help.Bun: Bun reports an emulated
process.version, so under Bun the check uses Bun's own fixed release (>= 1.4.4) instead. Otherwise everybun-run invocation would be judged on a meaningless Node number.Chromium findings
chromiumdoes not use the system libbrotli. Brotli is on the "keepers" list in itsdebian/scripts/unbundle, so it ships Chromium's own bundled copy.cfa184a. That revision contains the upstream fix0ed4268a("Detect and report invalid stream earlier"). Bookworm'schromium 150.0.7871.100-1~deb12u1is therefore patched.9801a2c, which predates the fix, so it is vulnerable.Not changed (by design)
brotli@1.3.3(npm) is a pure-JS port and isn't affected.Content-Encoding: br415 middleware was added.@hyperframes/{core,player,shader-transitions,studio}declare noenginesfield. Player and shader-transitions are browser packages, so no field was added to any of the four.@hyperframes/engine,@hyperframes/producerand@hyperframes/aws-lambdarely onengines.Leftovers / follow-ups
131.0.6778.85) is fixed separately in fix(cli): require patched Chrome 148+ and rebuild Docker image on Dockerfile change #6.oven-sh/setup-bunsteps have nobun-versionand resolve to the latest release, currently 1.4.4, which is patched. Pin it if reproducibility matters.nodejs22.xruntime, so it's patched only once AWS rolls out 22.23.4+. Its@sparticuz/chromium@148.0.0is on a patched Chromium line, though I didn't verify the bundled Brotli inside that specific artifact.Test plan
node:22.23.4-bookworm-slimexists on Docker Hub (amd64 and arm64), Bun 1.4.4 is on npm and GitHub, and 22.23.4 and 24.22.1 are in theactions/node-versionsmanifest.libbrotli1_1.0.9-2+deb12u1is published in bookworm-security andchromium 150.0.7871.100-1~deb12u1is in bookworm.chrome-headless-shell148.0.7778.167 linux64 zip returns HTTP 200.dpkg --compare-versionsguards: they pass for patched versions and fail for older ones.vitest run src/utils/nodeVersion.test.ts src/commands/doctor.test.ts: 44/44 pass.render, a bare invocation and--help, and letsdoctorthrough.cli.tswith a fakedprocess.version = v22.17.0and assertsprocess.exit(1)and the CVE message.engines.nodematches in all four packages.node --import tsx src/cli.ts …):renderand--helpexit 1 with the message.--versionexits 0.doctorruns and shows✗ Node.js v22.17.0with the CVE hint.doctorshows✓ Node.js v22.23.4.oxlintandoxfmt --checkare clean on the changed files, and a stricttsctypecheck of the new and changed modules passes.docker buildof any image, andbun run build/bun run test. Installing Docker and Bun was blocked in the agent environment, so tests ran through an isolated vitest install. The PR's CI regression job buildsDockerfile.test, butDockerfile.renderstill needs a manualdocker build.