Skip to content

chore(deps): patch viem and Miniflare ws for CVE-2026-140009 - #1224

Merged
sds merged 1 commit into
mainfrom
claude/patch-ws-ghsa-37g9
Dec 3, 2026
Merged

sds merged 1 commit into
mainfrom
claude/patch-ws-ghsa-37g9

Conversation

@sds

@sds sds commented Dec 3, 2026

Copy link
Copy Markdown
Member

Patches the high-severity ws memory-exhaustion DoS (CVE-2026-140009, GHSA-37g9-w4hg-h9qr), where automatic pong responses are unbounded. ws 8.21.0 was the only ws copy in the lockfile. Three parents pin it exactly: viem 2.57.20 (and viem 2.54.6 through the viem-zones-sandbox alias), and Wrangler 4.155.0's Miniflare 5.20261023.2-beta. The newest releases still pin 8.21.0: viem 2.58.8, Miniflare 5.20261129.0-beta, and Wrangler 4.170.0's Miniflare. Upgrading a parent wouldn't help, so this adds two scoped overrides to pnpm-workspace.yaml. They cover only the affected 8.x range under those two parents, and a comment says to remove them once viem and Miniflare require a patched ws:

'miniflare>ws@>=8.0.0 <8.23.0': 8.23.0
'viem>ws@>=8.0.0 <8.23.0': 8.23.0

The lockfile diff only swaps ws@8.21.0 for ws@8.23.0 and repoints miniflare, both viem snapshots, and isows (whose ws: '*' peer follows viem's) at it. No other packages change, and no supply-chain settings were touched.

Fixes Dependabot alert #280 (pnpm-lock.yaml).

Verification

  • pnpm install --lockfile-only then pnpm install --frozen-lockfile with pnpm 10.28.1 (matches packageManager and CI). Both pass under the repo's minimumReleaseAge, trustPolicy: no-downgrade and strictDepBuilds settings. The ws@8.23.0 integrity in the lockfile matches npm view ws@8.23.0 dist.integrity.
  • pnpm why ws -r shows only ws 8.23.0 (viem, isows, viem-zones-sandbox's viem 2.54.6, and Wrangler's Miniflare). node_modules/.pnpm holds only ws@8.23.0, and the lockfile has no 8.21.x or 8.22.x entries left.
  • pnpm run check (Biome, no fixes applied; check:styles and oxlint pass), pnpm run check:types, and pnpm run test (80 files, 1776 tests passed).
  • pnpm-lock.yaml at base commit e7b1914b100cdac7a122448701999647eaa02c7c:
    • SHA-256 before: 97de17dea0a739105a033fd1f35161101a04b8157610508813b97762e9995bf3
    • SHA-256 after: e616cc247d2d0e3c5e6169a906af617ffb314babe69c4053101cc1e01b152523

@claude claude Bot 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.

LGTM. This is a narrow, scoped override that patches the ws pong DoS.

What was reviewed:

  • The two new parent>ws@ range overrides in pnpm-workspace.yaml use the same selector style as the existing entries, and they match the overrides block in pnpm-lock.yaml exactly.
  • The lockfile has no ws@ 8.21.x/8.22.x left. miniflare, both viem snapshots and isows@ 1.0.7 (whose ws: '*' peer follows viem) all resolve to ws@ 8.23.0.
  • Not done here: I didn't run pnpm install --frozen-lockfile and didn't compare the ws@ 8.23.0 integrity hash against the registry. I only read the lockfile.
Extended reasoning...

The change touches only pnpm-workspace.yaml (two scoped overrides plus a comment) and the regenerated pnpm-lock.yaml, where ws goes from 8.21.0 to 8.23.0 in the package entry and in four snapshot references. It changes no application code. The only security-relevant surface is the dependency supply chain: a new integrity hash for ws@ 8.23.0. The overrides are limited to >=8.0.0 <8.23.0 under miniflare and viem, and the lockfile is internally consistent, with no leftover vulnerable ws copies. The repository has no CODEOWNERS or OWNERS files, the timeline shows no outstanding reviewer objections, and the bug hunt ended with a dry streak and no findings.

@sds
sds merged commit 7b63a27 into main Dec 3, 2026
14 checks passed
@sds
sds deleted the claude/patch-ws-ghsa-37g9 branch December 3, 2026 06:13
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