Skip to content

fix(docker): Node 22.23.4 and Bun 1.4.4 for CVE-2026-111497 (Brotli) - #6440

Merged
heygengenesis[bot] merged 1 commit into
mainfrom
sec/cve-2026-111497-node-22.23.4
Oct 27, 2026
Merged

heygengenesis[bot] merged 1 commit into
mainfrom
sec/cve-2026-111497-node-22.23.4

Conversation

@heygengenesis

@heygengenesis heygengenesis Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

Moves every hyperframes image runtime that bundles Google's Brotli decoder to a release with the CVE-2026-111497 fix:

Image Runtime that decodes Before After
packages/gcp-cloud-run/Dockerfile Bun (CMD ["bun", "dist/server.js"]) Bun 1.4.2 on node:22.23.3 Bun 1.4.4 on node:22.23.4
packages/cli/src/docker/Dockerfile.render (hyperframes render --docker) Node (hf-render) node:22.23.3-bookworm-slim node:22.23.4-bookworm-slim
Dockerfile.test (producer regression image) Node and Bun node:22.23.3, Bun 1.3.13 node:22.23.4, Bun 1.4.4 (matches engines.bun in package.json)

Why

CVE-2026-111497 ("Node2Shell") is an out-of-bounds write in Google's Brotli decoder, rated CVSS 9.2, with a public RCE proof of concept. Node and Bun both bundle a copy of the decoder, and both auto-decode Content-Encoding: br in fetch(). The fixed versions are Node 22.23.4 and Bun 1.4.4; 22.23.3 and 1.4.2 are the releases just before them.

The render path is reachable: the producer's htmlCompiler fetch()es remote asset src URLs from compositions. On Cloud Run that code runs under Bun, so the Bun bump is what closes the hole there. The Node bump alone would not, and the first revision of this PR missed that. Neither runtime has a switch to turn off br decoding in fetch(), so upgrading is the fix.

AWS Lambda needs no change. The handler zip runs on the managed nodejs22.x runtime, which AWS patches. The arm64 video function is a container on public.ecr.aws/lambda/nodejs:22@sha256:d138eff4…. That digest is the current 22 tag, built 2026-10-22, and its /var/lang/bin/node is v22.23.4, which I checked from the image layer itself.

Related work

Refs https://www.aikido.dev/blog/python-packages-vulnerable-node2shell-brotli-cve-2026-111497

How

Version pins only. No comments are added.

Test plan

  • Unit tests added/updated: not applicable (runtime pins only)
  • Manual testing performed:
    • With Bun 1.4.4: bun install --frozen-lockfile passes (741 packages). The Cloud Run build chain from the Dockerfile (parsers → … → gcp-cloud-run build) passes. bun dist/server.js boots and logs server_listening, which exercises the ESM require interop the pin comment warns about.
    • The node:22.23.4-bookworm-slim tag is published, and Bun 1.4.4's linux x64 and aarch64 release assets resolve.
    • CI's BeginFrame contract job and the Docker regression job build these images.
  • Documentation updated (if applicable): not applicable
  • Comments follow CONTRIBUTING.md "Comments"

Genesis session: https://genesis.hg.dev/v2/sessions/b313b8f6-cff5-5be0-a85e-da9e2b63c286
Session owner: Joel Gallardo

🤖 Generated with Claude Code

@heygengenesis
heygengenesis Bot force-pushed the sec/cve-2026-111497-node-22.23.4 branch from 7031189 to 0285440 Compare October 26, 2026 17:43
@heygengenesis heygengenesis Bot changed the title fix(docker): bump pinned Node to 22.23.4 for CVE-2026-111497 (Brotli) fix(docker): Node 22.23.4 and Bun 1.4.4 for CVE-2026-111497 (Brotli) Oct 26, 2026
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Oct 26, 2026
Merge 20 more upstream commits (acd0bc3..ad4d3fa, v0.8.205: heygen-com#6403,
heygen-com#6363, heygen-com#6209, heygen-com#6395, heygen-com#6424, heygen-com#6426, heygen-com#6442, heygen-com#6430, heygen-com#6402, heygen-com#6435, heygen-com#6439,
heygen-com#6449, heygen-com#5436, heygen-com#6455 and docs). No conflicts. Record the 11 open PRs
heygen-com#6440-heygen-com#6458 and issue heygen-com#6443 in docs/DECISIONS.md (none adopted), re-check
the earlier open PRs, and advance the commit watermark to ad4d3fa, the
PR watermark to heygen-com#6458 and the issue watermark to heygen-com#6443.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Joel Gallardo <joel.gallardo@heygen.com>
@heygengenesis
heygengenesis Bot force-pushed the sec/cve-2026-111497-node-22.23.4 branch from 0285440 to c18b1d9 Compare October 26, 2026 18:53
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Oct 26, 2026
…ing, pin reviewed PR heads

- The ad4d3fa entry said --strict "returned to green"; its own scope note
  (and the live checker) say it is red because upstream moved on. Say so.
- Two entries were both titled "2026-10-27(續)"; the CI flake entry is now
  "2026-10-27(CI 紅燈)" and UPSTREAM.md names the entry it points to.
- The open-PR table records the head SHA each PR had at review time
  (criterion 8 step 1), reconstructed from PR timeline force-push events,
  committer times and the diff stats the entry already recorded. heygen-com#6440 and
  heygen-com#6444 were force-pushed after review.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@joel-hg joel-hg left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed head c18b1d9 against main 3e16603. No blocking findings.

Security coverage: all three affected Dockerfiles select Node 22.23.4, and both Bun installations select 1.4.4. Cloud Run's actual entrypoint is Bun, so its Bun update is necessary and present. Node's release explicitly fixes CVE-2026-111497. Bun 1.4.4 pins google/brotli commit db24a98aed38a16de78cc05ca15cdd8dc2a0d92d (1.2.1), whose upstream release explicitly fixes the CVE. These releases are over three days old. No dependency constraints, locks, application code, or unrelated pins changed.

Independent validation in an isolated checkout, using checksum-verified Bun 1.4.4 and Node 22.23.4:

  • bun install --frozen-lockfile: passed, 741 packages; bun.lock unchanged.
  • bun run build: passed for the full workspace, including Cloud Run and CLI.
  • bun run --cwd packages/gcp-cloud-run test: 104 passed, 0 failed.
  • Focused runtime smoke: Brotli roundtrip and malformed-input rejection; actual compiler inlineExternalScripts fetched and decoded a Brotli HTTP response; built Cloud Run server started under Bun, /healthz returned 200, and malformed JSON returned 400.

CI on this head passed build/typecheck/lint/tests, the GCP BeginFrame image contract, and all ten Docker render regression shards. Logs confirm Node 22.23.4 and Bun 1.4.4 in the rebuilt images. The GCP CI job targets only beginframe-contract; the local full build/startup smoke supplies the missing application-stage evidence. The cancelled Studio/player capture job is immaterial to these runtime-only changes.

The existing Lambda base digest d138eff445f6ea04c51091d8e6cbb064d5663e850cddfa62396061586f98b126 resolves to an arm64 image created 2026-10-22; its Node version header and embedded binary version identify 22.23.4. Native execution was unavailable on this x64 host, so this is artifact inspection, not an arm64 execution test.

Operational limits: this approval covers source/image construction, not deployed-runtime attestation. Rebuild/redeploy Cloud Run and distribute the updated CLI release; existing version-tagged CLI renderer images are cached and need replacement if testing within the same CLI version. Managed Lambda runtime rollout was not inspected. During the first representative render batch after rollout, watch Cloud Run startup, handler_error, asset-fetch/decompression failures, and render latency. Use the actual service/revision names; the Terraform default service is hyperframes-render. Example Cloud Logging filter: resource.type="cloud_run_revision" resource.labels.service_name="hyperframes-render" (jsonPayload.event="handler_error" OR severity>=ERROR). No Datadog service mapping was established.

Sources: https://nodejs.org/en/blog/release/v22.23.4 ; https://github.com/oven-sh/bun/blob/bun-v1.4.4/scripts/build/deps/brotli.ts ; https://github.com/google/brotli/releases/tag/v1.2.1 .

@heygengenesis
heygengenesis Bot requested a review from miguel-heygen October 27, 2026 02:26
@heygengenesis
heygengenesis Bot enabled auto-merge October 27, 2026 04:40
@heygengenesis
heygengenesis Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 0fb9a50 Oct 27, 2026
119 of 120 checks passed
@heygengenesis
heygengenesis Bot deleted the sec/cve-2026-111497-node-22.23.4 branch October 27, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants