Repository navigation
fix(docker): Node 22.23.4 and Bun 1.4.4 for CVE-2026-111497 (Brotli) - #6440
Conversation
7031189 to
0285440
Compare
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>
0285440 to
c18b1d9
Compare
…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
left a comment
There was a problem hiding this comment.
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 .
What
Moves every hyperframes image runtime that bundles Google's Brotli decoder to a release with the CVE-2026-111497 fix:
packages/gcp-cloud-run/DockerfileCMD ["bun", "dist/server.js"])node:22.23.3node:22.23.4packages/cli/src/docker/Dockerfile.render(hyperframes render --docker)hf-render)node:22.23.3-bookworm-slimnode:22.23.4-bookworm-slimDockerfile.test(producer regression image)node:22.23.3, Bun 1.3.13node:22.23.4, Bun 1.4.4 (matchesengines.buninpackage.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: brinfetch(). 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
htmlCompilerfetch()es remote assetsrcURLs 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 offbrdecoding infetch(), so upgrading is the fix.AWS Lambda needs no change. The handler zip runs on the managed
nodejs22.xruntime, which AWS patches. The arm64 video function is a container onpublic.ecr.aws/lambda/nodejs:22@sha256:d138eff4…. That digest is the current22tag, built 2026-10-22, and its/var/lang/bin/nodeis 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
bun install --frozen-lockfilepasses (741 packages). The Cloud Run build chain from the Dockerfile (parsers→ … →gcp-cloud-run build) passes.bun dist/server.jsboots and logsserver_listening, which exercises the ESMrequireinterop the pin comment warns about.node:22.23.4-bookworm-slimtag is published, and Bun 1.4.4's linux x64 and aarch64 release assets resolve.Genesis session: https://genesis.hg.dev/v2/sessions/b313b8f6-cff5-5be0-a85e-da9e2b63c286
Session owner: Joel Gallardo
🤖 Generated with Claude Code