Skip to content

pin Bun 1.4.4, which fixes the Brotli decoder's out-of-bounds write (CVE-2026-111497) - #144

Merged
hkonsti merged 1 commit into
mainfrom
hkonsti/pin-bun-1.4.4
Oct 22, 2026
Merged

hkonsti merged 1 commit into
mainfrom
hkonsti/pin-bun-1.4.4

Conversation

@hkonsti

@hkonsti hkonsti commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Why

Bun before 1.4.4 has CVE-2026-111497 ("Node2Shell"), an out-of-bounds write in its Brotli decoder. Bun's fetch decompresses a Content-Encoding: br answer by itself, so any server the api fetches from can send a crafted one. For a custom MCP connection, that server is whatever URL the person typed in: discovery (mcp-discovery.ts) and every tool call (custom-mcp.ts) fetch it. So anyone who signs up could reach the decoder with input they choose, in the process that holds ENCRYPTION_KEY and DATABASE_URL. A public proof of concept came out on October 22. No attacks have been reported yet.

Bun 1.4.4 came out on October 22, and oven/bun:1-slim points to it now. The images were built from that floating tag, though, so a build that reuses a cached base layer can still ship 1.4.3.

What

  • Dockerfile: both stages are FROM oven/bun:1.4.4-slim, with a comment saying why it's pinned.
  • render.yaml: the docs' and website's BUN_VERSION goes from 1.4.2 to 1.4.4, the version the image is built with, as its comment says. They are build-only static sites, so they were never exposed.

Express 4 / body-parser 1.x doesn't decompress Brotli request bodies, so inbound requests were never a way in.

Testing

  • Built the image and ran it against Postgres 17: every migration applied, /health and the web app answer 200, and bun --version in the container is 1.4.4.
  • bun run test on Bun 1.4.4: all packages pass (api 828, web 182, integrations 50, utils 46, db 14, map 2, ui 1).

Rollout

Merging deploys the pinned image. Until then, prod may be running ≤ 1.4.3: it depends on whether today's deploys pulled the new base image, which we can't see from outside.

@hkonsti
hkonsti merged commit a36844a into main Oct 22, 2026
2 checks passed
@hkonsti
hkonsti deleted the hkonsti/pin-bun-1.4.4 branch October 22, 2026 21:35
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.

1 participant