Skip to content

chore(deps): clear the high undici DoS advisory from the tree - #195

Merged
sydevs-bot merged 1 commit into
mainfrom
claude/fix-deps-undici
Oct 26, 2026
Merged

sydevs-bot merged 1 commit into
mainfrom
claude/fix-deps-undici

Conversation

@sydevs-bot

Copy link
Copy Markdown
Contributor

Summary

Preview

Preview pending — no Cloudflare alias exists until this push deploys. The change alters no rendered output, so there is nothing to deep-link.

Test results

  • Lean gate: ✓ lint (0 errors), tsc --noEmit, vitest run — 88 files, 883 tests passed
  • Targeted specs: N/A — no source file changed
  • Build: ✓ pnpm build (Worker + client bundles)
  • pnpm audit --audit-level=high: high count 2 → 1, moderate 5 → 3. The remaining high is happy-dom, handled separately.

Manual verification

Nothing to click. Worth confirming by hand:

  1. pnpm why undici resolves a single 7.30.1 across payload, both miniflare copies and wrangler.
  2. pnpm dev and pnpm preview still boot — miniflare is the only consumer that executes undici locally.

Notes for reviewer

The override's old key matched nothing. 5bf505f (#185) added "[email protected]": "7.29.1". payload 3.91.0 and both miniflare copies have since bumped their own pins to exactly 7.29.1, so no requester asked for 7.29.0 any more and the override was inert — the tree sat on 7.29.1 by upstream default, not by our choice. That is the failure mode this PR is shaped to prevent, not just the CVE.

"undici@>=7.18.0 <7.30.1": "7.30.1" is the advisory's own vulnerable range. It stops matching once every requester asks for 7.30.1 or later, so it disappears on its own instead of pinning the tree to a version that later goes stale. pnpm supports a range in an override key.

This advisory is not reachable in our production runtime. grep -rl undici dist/ after pnpm build returns nothing: the Worker bundle contains no undici, because @payloadcms/sdk uses the platform fetch and payload's server never ships. undici executes here only in miniflare, which is local dev and wrangler tooling. So this is tree hygiene, not live exposure — but the fix is a one-line minor bump with no breaking changes, which is cheaper than carrying the alert.

Changelog checked for breakage. undici v7.30.1 lists no breaking or API changes. The behaviour changes are all tightenings: TLS 1.2 post-connect certificate errors no longer kill the process, per-origin Agent dispatchers now keep function-valued TLS options such as checkServerIdentity, cross-origin redirect responses are no longer cached under the original URL, over-long content-coding chains are rejected, SRI tokens are case-normalised, and EventSource/WebSocket gain bounded buffers. None of these are surfaces this repo configures — we construct no Agent, no EventSource and no undici WebSocket.

Detail

Why not a bare "undici": "7.30.1" override. It would force 7.30.1 on any future requester including one that wants a newer patch, and would itself go stale the next time an advisory lands. The range key cannot do either.

Why not ">=7.30.1" as the value. pnpm would resolve the newest match, which is 8.12.3 today — a major jump across every consumer, for no security reason.

Dependabot and pnpm audit disagree on the count. The push hook reports "1 high, 3 moderate" on main while pnpm audit --audit-level=high reported two highs before this change. Recorded, not explained.


Generated by Claude Code

undici 7.29.1 is vulnerable to GHSA-xjj6-f33q-929c (CVE-2026-109869,
CVSS 7.5): fetch() crashes the process when a server returns more than
five content codings and closes the connection before the body. 7.30.1
validates the coding chain before creating the body stream, and clears
seven further advisories, two of them moderate ones pnpm audit also
reported here.

The existing `[email protected]` override had gone dead: payload 3.91.0 and
miniflare now pin 7.29.1 themselves, so nothing requested 7.29.0 and the
override matched nothing. Keying the replacement on the advisory's own
vulnerable range makes it self-expiring instead — once every requester
asks for 7.30.1 or later it stops matching, rather than silently holding
the tree at whatever version it names.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EQQJHec7B8x4Sn2boMrjis
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying wemeditate-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: d19a1bb
Status: ✅  Deploy successful!
Preview URL: https://0ef6779a.wm-design.pages.dev
Branch Preview URL: https://claude-fix-deps-undici.wm-design.pages.dev

View logs

@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Adversarial review skipped: 2 file(s), 16 changed line(s), under review.skipWhen. Say @sydevs-bot review to force one.

🤖 sydevs dispatcher

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-web d19a1bb Commit Preview URL

Branch Preview URL
Oct 24 2026, 04:45 PM

@sydevs-bot sydevs-bot moved this from Revising to Approved in SYDevelopers Technical Roadmap Oct 26, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 98e964d Oct 26, 2026
25 checks passed
@sydevs-bot
sydevs-bot deleted the claude/fix-deps-undici branch October 26, 2026 20:04
@sydevs-bot sydevs-bot moved this from Approved to Done in SYDevelopers Technical Roadmap Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants