Skip to content

fix(deps): override @hono/node-server to ^2.0.5 (Windows path traversal, #4401) - #4591

Merged
imdreamrunner merged 1 commit into
meta:mainfrom
jiunshinn:fix/4401-hono-node-server-override
Aug 4, 2026
Merged

imdreamrunner merged 1 commit into
meta:mainfrom
jiunshinn:fix/4401-hono-node-server-override

Conversation

@jiunshinn

Copy link
Copy Markdown
Contributor

Fixes #4401 (Dependabot alert #106).

What

Adds a pnpm override forcing @hono/node-server to >=2.0.5:

  • @modelcontextprotocol/[email protected] (used by apps/docsite, directly and via mcp-handler) depends on @hono/node-server ^1, which resolved 1.19.14 — vulnerable to path traversal in serve-static on Windows via encoded backslashes (%5C).
  • The fix landed in 2.0.5, a semver-major the sdk's ^1 range can never reach on its own, so this needs either an sdk release on 2.x or a targeted override. This PR takes the override route (same shape as the merged sharp override, fix(deps): override sharp to 0.35 to clear inherited libvips CVEs (#4400) #4449, and the js-yaml override, deps: bump js-yaml to ^5.2.2 to fix DoS (fixes #4399) #4402).
  • Overrides live in pnpm-workspace.yaml (pnpm 11 no longer reads pnpm.overrides from package.json), with a comment explaining why and when to drop it, following the existing sharp/js-yaml entries.

Verification

Resolution — pnpm install resolves @hono/[email protected] (2.0.12 is held back by minimumReleaseAge); pnpm why confirms a single version workspace-wide, and the lockfile diff touches only this chain.

API compatibility — the sdk's only import from @hono/node-server is getRequestListener(fetchCallback, { overrideGlobalObjects: false }) in dist/*/server/streamableHttp.js. 2.0.11 exports getRequestListener with the same signature including the overrideGlobalObjects option (verified in dist/index.d.mts). The sdk does not use serve, createAdaptorServer, or serve-static. 2.x peers on hono ^4, which the workspace already holds at ^4.12.25.

Runtime smoke test — ran a full MCP session over the sdk's Node StreamableHTTPServerTransport (the only code path that loads @hono/node-server) with 2.0.11 installed: stateless per-request transport (the same mode the docsite /mcp route uses via mcp-handler), real HTTP server, sdk client. initialize → tools/list → tools/call all succeeded:

@hono/node-server resolved: @hono/node-server 2.0.11
initialize: OK (server info: { name: 'smoke', version: '1.0.0' } )
tools/list: OK -> [ 'ping' ]
tools/call ping: OK -> [{"type":"text","text":"pong 4401"}]
SMOKE TEST PASSED

(Note: the docsite route itself goes through the sdk's webStandardStreamableHttp transport, which doesn't touch @hono/node-server at all — the Node transport smoke above is the worst-case path.)

Repo checks — pnpm -F @astryxdesign/docsite generate && test: 303/303 pass. pnpm -F @astryxdesign/docsite typecheck: clean. check:sync / check:package-boundaries / check:changesets / check:demo-media / check:executable-bits: all green. Pre-existing peer warnings (mcp-handler wants sdk 1.26.0, @stylexjs/unplugin wants unplugin ^2) are unchanged by this PR.

Engines note — @hono/node-server 2.x requires Node >= 20 (1.x was >= 18.14.1); the repo is on Node 24 (.nvmrc, CI), so no impact.

Changeset

None — only pnpm-workspace.yaml + pnpm-lock.yaml change, no published package is modified. Same as the merged sharp override #4449.

Conflict note

This touches the same overrides: block as open PR #4101 (prune stale pnpm overrides / move pins to the catalog) — whichever lands second will need a trivial rebase.

@vercel

vercel Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Jul 31, 2026 10:42am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 31, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jul 31, 2026
@jiunshinn
jiunshinn marked this pull request as ready for review July 31, 2026 11:54
@imdreamrunner
imdreamrunner enabled auto-merge (squash) August 4, 2026 00:49

@imdreamrunner imdreamrunner 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.

Thanks!

@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Aug 4, 2026
@imdreamrunner
imdreamrunner merged commit fce8b64 into meta:main Aug 4, 2026
22 checks passed
@github-actions
github-actions Bot deleted the fix/4401-hono-node-server-override branch August 5, 2026 08:36

This branch was successfully deployed

1 active deployment
Preview — a6042414 Deployed Jul 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deps: @hono/node-server 1.x -> 2.x (path traversal on Windows)

2 participants