Repository navigation
chore(deps): bump next to 16.3.4 and sharp to 0.35.4, replacing #732 and #735 - #741
Merged
Merged
Conversation
Supersedes #732 (next 16.2.11) and #735 (sharp 0.35.4 + an overrides entry). One bump replaces both, and clears strictly more. The failure this prevents: two CRITICAL advisories that neither open PR reaches. Both are unauthenticated remote code execution, and both are fixed only in next 16.3.3 — GHSA-2xp9-vwfh-vxw4 RCE in the Image Optimization API >=16.0.0 <16.3.3 GHSA-p293-qw3h-jr36 RCE on Windows-hosted servers >=16.0.0 <16.3.3 16.2.11, the target of #732, is inside both ranges. No sharp bump reaches either. next 16.3.4 declares sharp ^0.35.4 as its own optional dependency, so bumping our direct `sharp` to ^0.35.4 leaves one copy in the tree with no overrides entry at all. #735 needed one only because next 16.2.x declares ^0.34.5, a caret on a 0.x line, which pins the minor. Measured against origin/main's lockfile on the same day: high+critical 31 -> 23, moderate 20 -> 15. next 6 -> 0, sharp 2 -> 0. eslint-config-next moves with next to keep the lint rules on the same minor. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KMbSpgLANf3FccYW7xJPRv
Both lines predate this PR — main is already on next 16.2.6 — but a PR that moves the Next minor is where a reader will check them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KMbSpgLANf3FccYW7xJPRv
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-741
September 9, 2026 15:15
Destroyed
|
🚅 Deployed to the SahajCloud-pr-741 environment in sahajcloud
1 service not affected by this PR
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
next16.2.6 → 16.3.4,sharp0.34.5 → 0.35.4. One bump, nooverridesentry.next16.3.3.>=16.0.0 <16.3.3>=16.0.0 <16.3.3The Image Optimization API is reachable here:
/_next/imageis public and unauthenticated, andnext.config.mjs:69-90declares threeremotePatterns. The Windows one is not — Railway runs Linux — but it is cleared by the same bump.Why one PR does the work of two
[email protected]declaressharp: "^0.35.4"as its own optional dependency.[email protected]declares^0.34.5, and a caret on a0.xline pins the minor — which is the only reason #735 needed anoverridesentry at all. Movenextand the entry becomes unnecessary:pnpm why next→ one version, 16.3.4.pnpm why sharp→ one version, 0.35.4, resolved throughnextand through our own dependency.pnpm-workspace.yamlis untouched by this PR.Changes
package.json—next^16.2.6→^16.3.4,eslint-config-nextlikewise (keeps the lint rules on next's own minor),sharp^0.34.5→^0.35.4.pnpm-lock.yaml— the resolution.README.md,AGENTS.md— a separatedocs:commit, correcting two "Next.js 15" lines. Both were already stale againstmain's 16.2.6.No source file changes, and
pnpm-workspace.yamlis untouched. Two commits, one behaviour each.The security claim, measured
pnpm audit, run twice today — once againstorigin/main's lockfile, once against this branch:nextsharpfast-uribrace-expansionjs-yamlimage-sizenanoidbrowserslistpostcsssocket.io-parserundicinodemailerBoth
nextcriticals and bothsharphighs are gone. Nothing else moved, in either direction. GitHub's own push-time warning onmainreports the same shape: "2 critical, 29 high, 19 moderate".Breaking changes in 16.3, each checked rather than assumed
Read from the 16.3.0 release notes and the 16.3 blog post, then checked against this repo. 16.3.1–16.3.4 carry no breaking changes; 16.3.3 is the security release and 16.3.4 re-enables AVIF optimization.
nodejsreplaces it)runtimeanywhere insrc/.src/middleware.tsstill compiles to Edge, so the warning may appear — a warning, not a failure.middlewareconvention deprecated in favour ofproxysrc/middleware.ts:15. Pre-existing since 16.0, not introduced here: the same warning string is in 16.2.6.proxyis nodejs-only, andsrc/plugins/cache/policy.ts:8-9is built around the Edge bundle — so the migration is a decision, not a rename. Named as a follow-up below.unstable_instant→instant(),unstable_io()→io()experimental.useCachedeprecatednext.config.mjsdeclares noexperimentalblock at all.experimental.dynamicIO,viewTransition,partialFallbacks,useNodeStreams,instantNavigationDevToolsToggleremoved/_next/static/src/.instant/unstable_dynamicStaleTime(mutually exclusive, hard error)>=20.9.0in both 16.2.6 and 16.3.4..node-versionis 22.17.0.unstable_cacheis still exported by 16.3.4 (node_modules/next/cache.d.ts:1), sosrc/lib/atlasSidebar/getAtlasSidebarData.ts:21,180needs no change.revalidateTag(ATLAS_SIDEBAR_TAG, 'max')already passes the 16.0 profile argument.Two defaults that changed, measured against the 16.2.6 tarball rather than the blog
experimental.turbopackFileSystemCacheForBuild:false→true. Build-time compiler artifacts now cache to disk. It only bites a Turbopack build, and ours is webpack (below), so the effect here is nil — but it is a real default change on Railpack.agentRulesis new (absent from 16.2.6'sconfig-shared.js, present in 16.3.4's).next devwrites a managed block intoAGENTS.mdwhen it detects an agent in the environment. This repo'sCLAUDE.mdis a symlink toAGENTS.md, so a localpnpm devmay now produce an uncommitted diff in the agent guide.agentRules: falseopts out. Not set here — see the follow-ups.The Turbopack/webpack build gate is not a regression
16.3.4 hard-exits (
process.exit(1)) whenTURBOPACK=auto, awebpackconfig exists and noturbopackconfig does —node_modules/next/dist/lib/turbopack-warning.js:157.next.config.mjs:32-40has awebpackkey and noturbopackkey, so this reads like a broken Railway build.It is not. The identical gate is in 16.2.6, at the same line number, verified by unpacking the 16.2.6 tarball — and
pnpm buildis green here regardless. Flagging it because it looks alarming in the 16.3 source and someone will find it again.The image optimizer, since that is where the critical lives
GHSA-2xp9-vwfh-vxw4 is a libheif heap overflow reached through
sharpwhen Next optimizes an attacker-controlled AVIF. 16.3.3 patched it by disabling AVIF optimization; 16.3.4 re-enables it on a fixed path.Reachability here, both ways:
/_next/imageis public and unauthenticated, andnext.config.mjs:69-90allows the R2 delivery host,**.cloudflarestream.comandimg.shields.io— the optimizer does fetch third-party-influenced bytes.images.formatsdefaults to["image/webp"]in 16.3.4 and we never override it, so AVIF output is not enabled on this deployment. That also retires chore(deps): bump sharp to 0.35.4 for the libvips CVEs, and override next's nested copy #735's "AVIF retuning will change byte sizes" caveat, and explains why its adversarial review could not get an AVIF response out of the preview: there was none to get.The bump is still the fix. The default is a mitigation, not a patch.
Test results
Full Tier 3 locally, not the lean gate — a framework minor moves
payload's resolved tree, and CI does not build this app.pnpm lintpnpm typecheck, ✓pnpm typecheck:testsVITEST_INT_MAX_FORKS=2, per chore(deps): bump next to 16.2.11 for the reachable Server Actions DoS #732's note)pnpm build— compiled in 48s,standalone-postbuildcopied.next/staticandpublic/. The build ran on webpack, and printed exactly one warning: the pre-existingmiddleware→proxydeprecation.pnpm install --frozen-lockfile: ✓ clean, no undecided-build-script error.pnpm why next→ one version, 16.3.4.pnpm why sharp→ one version, 0.35.4.Targeted specs: none. No source file changes, so no spec covers this diff; the evidence is the suites above passing against the new tree, plus the audit table.
What the lockfile actually moves
Tight, and all of it downstream of the two packages:
next16.3.4 with its eight@next/swc-*binaries,@next/env, and@swc/helpers0.5.15 → 0.5.23.sharp0.35.4 with every@img/sharp-*platform package,@img/sharp-libvips-*1.2.4 → 1.3.3,@img/colour1.0.0 → 1.1.0, and a new@emnapi/runtime. Two new optional platform targets appear (freebsd-wasm32,webcontainers-wasm32); neither installs on Linux x64.eslint-config-next/@next/eslint-plugin-next16.3.4.@payloadcms/*and@sentry/nextjskeys, because sharp 0.35 adds an optional@types/nodepeer, sonext's peer key gains(@types/[email protected]).It does not carry #732's incidental cascade: no
rollup,terser,dompurify,ws,viteorvitestmovement, and no@napi-rs/lzma-linux-x64-gnu— the optional native package #732 flagged for excluding our Node version is absent from this tree.Notes for reviewer
This PR exists because @Ardnived asked for it on chore(deps): bump sharp to 0.35.4 for the libvips CVEs, and override next's nested copy #735: one PR resolving both by updating
next, with the superseded PRs closed. chore(deps): bump next to 16.2.11 for the reachable Server Actions DoS #732 and chore(deps): bump sharp to 0.35.4 for the libvips CVEs, and override next's nested copy #735 are closed as superseded, each pointing here.pnpm-workspace.yamlis deliberately unchanged, and that reverses one adopted finding from chore(deps): bump sharp to 0.35.4 for the libvips CVEs, and override next's nested copy #735. chore(deps): bump sharp to 0.35.4 for the libvips CVEs, and override next's nested copy #735 removedallowBuilds: sharp: true, on registry evidence that[email protected]ships noinstallscript. That evidence is correct and the conclusion is still wrong. Tested on this branch: with the entry removed,pnpm install --frozen-lockfilefails —— and pnpm rewrites
pnpm-workspace.yamlwith an undecidedsharpentry. Restoring the entry makes the same install pass. That also settles the ⚠ raised in this comment: the entry decides a case pnpm still asks about, so it stays. A frozen-lockfile install is what CI and Railpack both run, so this one would have failed the deploy, not merely a local run.One high advisory this PR does not clear, and could.
[email protected]pinspostcss: 8.5.23exactly. Ourpostcss: '^8.5.10'override inpnpm-workspace.yaml:37replaces that exact pin with a range, and the lockfile keeps 8.5.17 — which carries GHSA-r28c-9q8g-f849 (high, path traversal in source-map auto-loading, patched>=8.5.18) plus a moderate. A one-line override bump to^8.5.23clears both. It is not in this PR because an override's blast radius is its own change, and because this PR should stay readable as "two packages moved". Say the word and it is a one-line follow-up.nodemaileris also in range and unfixed.^9.0.3permits 9.1.1; 9.0.3 carries one high and three moderates. Same reasoning — not this PR.js-yamlnow reports two highs, not one. GHSA-2883-xcg3-v3hh was published after chore(deps): bump next to 16.2.11 for the reachable Server Actions DoS #732's snapshot. chore(deps): bump next to 16.2.11 for the reachable Server Actions DoS #732's documented hold still applies: 4.3.2 removes thebinaryTagexport@apidevtools/json-schema-ref-parserimports, which breaks three integration suites.Three follow-ups this bump surfaces, none of them done here, and no tickets filed for them:
middleware→proxy. Deprecated since 16.0, still only a warning.proxyis nodejs-only, so it costs the Edge bundlesrc/plugins/cache/policy.tsis built around — a decision, not a rename.agentRules: falseinnext.config.mjs, ifnext devstarts writing intoAGENTS.md. OurCLAUDE.mdsymlinks to it, so the blast radius is the agent guide itself. Left unset because I could not reproduce the write here.postcssandnodemailerbumps above.What no local run proves.
pnpm buildis green here, which covers compile and the standalone postbuild. It does not cover runtime behaviour on Railway — the preview deploy is the check for that, and/_next/imageis the request worth making against it.chore(deps): next 16.2.6 carries a reachable Server Actions DoS, and sharp needs an out-of-range bump #721 is covered in full — both item 1 (
next) and item 2 (sharp). Left asRefs, notCloses, since closing the ticket is yours.Refs #721
🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_01KMbSpgLANf3FccYW7xJPRv
Generated by Claude Code