Repository navigation
chore(deps): clear the high sharp advisory from the Workers toolchain - #170
Conversation
sharp 0.35.4 -> 0.35.5 (GHSA-wq5f-xc86-pv6w, high, CVE-2026-96889 in the bundled librsvg). miniflare pins sharp exactly, so the fix arrives only by lifting miniflare, and both of its parents already allow the newer one: - wrangler 4.147.0 -> 4.149.0 (devDependency, in range `^4.147.0`) - @cloudflare/vite-plugin 1.62.5 -> 1.63.1 (transitive of @photonjs/cloudflare, in range `^1.19.0`) - miniflare 5.20261001.0-alpha -> 5.20261006.1-alpha, workerd 1.20261001.1 -> 1.20261006.1, sharp 0.35.4 -> 0.35.5 - esbuild 0.28.1 drops out, deduped into the 0.28.2 both now share sharp reaches us at `runtime` scope through @photonjs/cloudflare, which is a production dependency, but it is a native addon the deployed Worker can never load. `grep -rl sharp dist/server` finds nothing but a sourcemap before and after, so this bump is hygiene on the local and build toolchain, not a live production exposure. Checked for breakage: read the wrangler 4.148.0/4.149.0 and vite-plugin 1.63.0/1.63.1 changelogs. The one entry that touches build output ships `using` and `await using` to the runtime instead of lowering them (#16003); this tree declares neither, and every dist/server chunk keeps its name and byte size across the bump. The remaining behaviour changes land on Workers Assets retries, `wrangler preview` secrets, R2 lifecycle flags, generated types and the update notice — none of which this repo configures or calls. CI never invokes wrangler, so moving a notice to stderr changes nothing here. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015MuSksiFHv2Fk1NpoHmPTN
Deploying wemeditate-design with
|
| Latest commit: |
ab88288
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://692fa902.wm-design.pages.dev |
| Branch Preview URL: | https://claude-chore-deps-sharp.wm-design.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | ab88288 | Commit Preview URL Branch Preview URL |
Oct 10 2026, 02:18 AM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Right size for the problem: two files, one advisory, nothing bespoke added. GHSA-wq5f-xc86-pv6w is fixed in sharp 0.35.5, and the lockfile lands exactly that. All 99 changed lockfile keys sit in the sharp/workerd/miniflare/wrangler/vite-plugin/esbuild cluster. No unrelated package moved.
The body is the weak part. It says "only the lockfile moves" while editing package.json. The real reason for that edit is missing: @cloudflare/vite-plugin 1.63.1 raised its peer floor to wrangler: ^4.149.0.
One system question, not this PR's to fix. @photonjs/cloudflare sits in dependencies, yet no source file imports it — wrangler.toml reaches it through the build-time virtual module virtual:photon:cloudflare:server-entry. @vitejs/plugin-react is in dependencies too, used only by vite.config.ts. That runtime scope is why Dependabot raised a toolchain CVE at all, and the next one will arrive the same way. Worth a ticket to move both to devDependencies.
Findings
should-fix— Summary contradicts the diff; keep the bump and name the peer floor.package.json:77consider— "collapsing two@cloudflare/vite-pluginresolutions into one" is wrong.pnpm-lock.yaml:293
What was checked
Read package.json, wrangler.toml, vite.config.ts, pages/+config.ts, server/entry.ts. Diffed both lockfiles key by key: 99 keys change, none outside that cluster. sharp, miniflare and @cloudflare/vite-plugin each resolve once, before and after. esbuild goes 3 → 2 as 0.28.1 drops, which is the whole −268 line delta. The GitHub advisory confirms 0.35.5 as the first patched sharp. compatibility_date stays 2025-09-06, so the workerd bump cannot move production semantics. No workflow invokes wrangler. Not re-run: the two builds behind the byte-identical-chunks claim.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
|
Both review findings were about the body, not the diff. Both verified, both adopted, and the body is rewritten. No commit, so
Also refreshed the Preview section: both Cloudflare previews have published since the body was written. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
sharp0.35.4 → 0.35.5 clears GHSA-wq5f-xc86-pv6w (high, CVE-2026-96889 in librsvg).package.jsonmoves one line with it:@cloudflare/vite-plugin1.63.1 raised its peer floor fromwrangler: ^4.147.0to^4.149.0,so the declared range had to follow.
Change outline
miniflarepinssharpexactly, so the patched 0.35.5 arrives only by liftingminiflare. Twoparents pin
miniflare, and both had to move together or pnpm keeps two copies.The
wrangleredit is the plugin's new peer floor, not a cosmetic bump.^4.147.0would stillresolve 4.149.0 today, but it would no longer state the constraint the plugin enforces, and an
install that resolved any 4.147.x or 4.148.x under it would hit an unmet peer.
Both now resolve one
miniflare, where the fix lives:esbuild0.28.1 drops out of the lockfile: wrangler 4.149.0 moved to the 0.28.2 the rest of thetoolchain already used. That dedupe — 3
esbuildresolutions before, 2 after — is the wholereason the lockfile loses more lines than it gains.
@cloudflare/vite-pluginresolves once onboth sides, so nothing collapses there.
Preview
Every
dist/serverchunk keeps its name and byte size across the bump, so the preview should beindistinguishable from
main.Test results
lint+tsc --noEmit+test:runpnpm buildManual verification
pnpm prod— wrangler 4.149.0 and workerd 1.20261006.1 serve the built Worker locally.pnpm audit --prod --audit-level=high—sharpis gone; twoundiciadvisories remain, see below.Notes for reviewer
sharpreaches us atruntimescope, through@photonjs/cloudflareindependencies, which iswhy Dependabot raised it. It is a native addon the deployed Worker can never load:
grep -rl sharp dist/serverfinds only a sourcemap, before and after. So this is toolchainhygiene, not a live production exposure — worth taking because the fix was already in range.
That
runtimescope is itself wrong, and will keep misclassifying toolchain CVEs: #171.Two high
undiciadvisories stay open onmainand are deliberately not in this PR:GHSA-rfgv-xxqx-mfg5 and GHSA-w293-vg96-wgc3, patched in 7.29.1.
payloadpinsundicito exactly7.29.0and 3.90.2 is its latest release, so no in-range fix exists.undiciis also unreachablehere: its only importer is
payload/dist/uploads/safeFetch.js, a path this repo never runs, and itappears nowhere in
dist/serverordist/client. Forcing it with apnpm.overridesentry wouldoverride an upstream exact pin for no change in our risk, and would become a downgrade the moment
payloadbumps it itself. Left for the next@payloadcms/*release.Detail
Changelogs read. wrangler 4.148.0 and 4.149.0,
@cloudflare/vite-plugin1.63.0 and 1.63.1.The one entry that touches build output is #16003:
usingandawait usingship to the runtime aswritten instead of being lowered into helper code. On Vite 7 the Worker environments tell esbuild
the syntax is supported. This tree declares neither form, and the build confirms it — identical
chunk names and byte sizes.
The other behaviour changes land on surfaces this repo does not use: Workers Assets upload retries
(no
[assets]inwrangler.toml),wrangler previewsecret carry-over, R2 lifecycle flaghandling,
wrangler typesmodule rules, local R2 key encoding, the update-version notice, andtemporary-account notices moving to stderr. CI never invokes wrangler — Cloudflare's own build
integration deploys the previews — so nothing here parses its stdout.
Steps skipped, and why.
/simplifyand/code-reviewwere not run: the diff is a generatedlockfile plus one semver range, with no source code to review. What was reviewable instead is the
resolution itself, verified directly —
pnpm why sharpreports a single 0.35.5 after the change,pnpm audit --prod --audit-level=highdrops from three highs to two, and@photonjs/cloudflare'sdeclared
^1.19.0already admitted@cloudflare/vite-plugin1.63.1.wrangleris the onedeclared range that had to move, because 1.63.1 raised its peer floor to
^4.149.0.security-reviewskipped: no changed path matchessecurityReview.triggerPattern.comment-lint.mjs: 0 changed files.bracesGHSA-vfj7-8cjw-p6xm (high) also remains, via@ladle/react > globby > fast-glob > micromatch. It is dev-only and has no patched version at all, so there is nothing to ship.🤖 Generated with Claude Code
https://claude.ai/code/session_015MuSksiFHv2Fk1NpoHmPTN
Generated by Claude Code