Skip to content

Override sharp to 0.35.5 past miniflare's exact pin - #20

Merged
barnumbirr merged 1 commit into
masterfrom
override-sharp-0.35.5
Oct 7, 2026
Merged

barnumbirr merged 1 commit into
masterfrom
override-sharp-0.35.5

Conversation

@barnumbirr

@barnumbirr barnumbirr commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

sharp below 0.35.5 carries GHSA-wq5f-xc86-pv6w (HIGH, in its bundled librsvg). It is a dev dependency, arriving through wrangler's miniflare, which pins it to exactly 0.35.4. Every miniflare since 5.20260910.0-alpha does the same, including the one wrangler 4.148.0 (the latest) pulls, and none admits 0.35.5, so no wrangler bump can move it. "overrides": {"sharp": "^0.35.5"} forces it past the pin, the same lever pkghaus/plausible-worker already uses.

The lockfile change is sharp 0.35.4 → 0.35.5 and its @img binaries (27 entries) and nothing else; wrangler and miniflare do not move. npm audit goes from 3 HIGH (sharp, and miniflare and wrangler through it) to 0. The worker has no test script. wrangler deploy --dry-run builds a worker bundle byte-identical to master's: sharp belongs to wrangler's local emulator, and a Worker never runs node_modules.

Remove the override once wrangler's miniflare pins sharp 0.35.5 or later.

On merge: deploy-worker.yml redeploys an identical bundle.

npm audit reports GHSA-wq5f-xc86-pv6w (HIGH, CVE-2026-96889 in sharp's
bundled librsvg, sharp < 0.35.5) against sharp 0.35.4, and lists
miniflare and wrangler as HIGH through it.

A wrangler bump cannot fix it. wrangler 4.148.0, the newest release,
depends on miniflare 5.20261006.0-alpha, which pins sharp to exactly
0.35.4, as does the miniflare this lockfile already has. overrides.sharp
forces the single copy to ^0.35.5.

sharp is a dev dependency only, pulled in by miniflare, wrangler's local
emulator; a deployed Worker never executes node_modules. Remove the
override once wrangler's miniflare pins sharp 0.35.5 or later.

The lockfile moves sharp 0.35.4 -> 0.35.5 and its 26 @img/* optional
packages (libvips 1.3.3 -> 1.3.4), nothing else. It was written by npm
12.2.0 (byte-identical under 11.19.0); npm 10.9.8 would drop the libc
fields the file already carries.

Verified under Node 22 / npm 10.9.8, as CI runs: npm ci clean, npm ls
shows one sharp 0.35.5 and it loads. The package defines no tests. npm
audit: 3 HIGH (sharp, miniflare, wrangler) before, 0 after. wrangler
deploy --dry-run builds a byte-identical no-op-worker.js (313 bytes)
on both sides.
@barnumbirr
barnumbirr merged commit bcd479c into master Oct 7, 2026
1 check passed
@barnumbirr
barnumbirr deleted the override-sharp-0.35.5 branch October 7, 2026 12:27
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