Skip to content

chore(deps): bump next to 16.2.11 for the reachable Server Actions DoS - #732

Closed
sydevs-bot wants to merge 1 commit into
mainfrom
claude/chore-deps-next-security
Closed

sydevs-bot wants to merge 1 commit into
mainfrom
claude/chore-deps-next-security

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • next 16.2.6 → 16.2.11, a lockfile refresh only. package.json already declares ^16.2.6, so the manifest is untouched.
  • Clears all four next high advisories. High advisories drop from 26 to 22.
  • The failure this prevents: GHSA-m99w-x7hq-7vfj, a DoS in App Router Server Actions, reachable from three public unauthenticated endpoints.

Why this one is reachable

src/app/(frontend)/registrations/feedback/actions.ts, .../unsubscribe/actions.ts and src/app/(frontend)/events/verify/actions.ts are Server Actions with no auth in front of them. The other three advisories that applied to 16.2.6 are not reachable here — custom-server SSRF (we run Next's own standalone server per railway.toml), rewrites SSRF (next.config.mjs declares none), Turbopack middleware bypass (the build is plain next build) — but the same bump clears them.

The blanket refresh in the ticket does not work

#721 suggests pnpm update in range. That was tried first and broke the tree twice, both unrelated to any advisory:

Bump Breaks
js-yaml 4.3.0 → 4.3.2 drops the binaryTag export that @apidevtools/json-schema-ref-parser imports — 3 integration suites fail to load
rrule-temporal 1.4.5 → 1.6.0 retypes its API against temporal-spec, which does not unify with @js-temporal/polyfill — pnpm typecheck fails in src/lib/schedule/scheduleHooks.ts

A blanket update also rewrote every dependency range in package.json: pnpm 11's update edits the manifest, which is not what "a lockfile refresh, not a manifest change" asks for.

It also does not deliver what the ticket predicted — but not because nothing moves. #721 expected "the same lockfile refresh should clear most of" the other high advisories. The audit total for them is unchanged, and the two runs below prove it: every package except next keeps its exact advisory count.

The reason is duplication, not immobility. Four of the 22 do gain a patched copy in this diff — fast-uri 3.1.7, postcss 8.5.28, nanoid 3.3.18, browserslist 4.28.9, each added beside the version already there rather than replacing it. The vulnerable copies survive because their parents pin them: [email protected], [email protected] and @babel/[email protected] still resolve the old ones. So each of the 22 needs its parent to re-resolve, which an in-range next refresh cannot force.

What else moves

A next lockfile refresh is not a one-package diff. The peer-suffix cascade also re-resolves about 20 unrelated packages, among them rollup 4.62.2 → 4.63.1 (with its 25 native binaries), terser 5.49.0 → 5.51.2 under both vite and webpack, dompurify 3.4.12 → 3.4.15, plus ws, acorn, node-abi, enhanced-resolve, js-base64, vite and vitest.

It also adds one native optional dependency that did not exist before, @napi-rs/lzma-linux-x64-gnu, whose engines exclude .node-version 22.17.0. Being optional, pnpm skips it, which is why CI stayed green — worth knowing rather than discovering later.

Still open on #721

sharp 0.34.5 → 0.35.x is not in this PR. It is out of range (caret on 0.x pins the minor), so it needs an edited manifest and its changelog read — the ticket asks for that to be its own PR, and it is #735. #721 stays open; this PR only references it.

Test results

  • Lean gate: ✓ pnpm lint, pnpm typecheck, pnpm typecheck:tests
  • Unit: ✓ 126 files, 1646 tests
  • Integration: ✓ 72 files, 1177 tests — the full lane, since this moves payload's resolved tree
  • pnpm peers check: ✓ no issues
  • Build: N/A — Railway builds the preview

The security claim, measured rather than asserted. pnpm audit --audit-level=high --json run twice, once against origin/main's lockfile and once against this branch, grouped by package:

Package main this branch
next 4 0
fast-uri 6 6
brace-expansion 5 5
browserslist 2 2
image-size 2 2
nanoid 2 2
js-yaml 1 1
postcss 1 1
sharp 1 1
socket.io-parser 1 1
undici 1 1
high total 26 22

⚠ The int lane needs VITEST_INT_MAX_FORKS=2 on a 4-CPU box; the default fork count gives nondeterministic failures across unrelated suites.

Notes for reviewer

  • No behaviour change is claimed or tested here. A patch-level framework bump has no assertion of its own to write, so the evidence is the existing suites passing against the new tree, run in full rather than lean.
  • Two packages are deliberately held back, and one of them carries a HIGH advisory. rrule-temporal is a pure maintenance bump. js-yaml 4.3.0 is not — it carries GHSA-5p4m-2wfm-xmqj, quadratic CPU consumption in !!omap resolution, fixed in 4.3.2, and it is one of the 22 highs the table above still counts.
    The hold is still the right call, but it should be held for a stated reason rather than a wrong one. js-yaml reaches the production tree through payload > json-schema-to-typescript > @apidevtools/json-schema-ref-parser, and through @eslint/eslintrc in dev. Every one of those call sites parses repo-local schema files during type generation or linting, never request input, so no untrusted YAML reaches yaml.load() — and 4.3.2 removes the binaryTag export that json-schema-ref-parser imports, so taking the fix breaks three integration suites.
    Neither hold is encoded — no override was added — so a future refresh meets them again. The existing js-yaml: ^4.3.0 override in pnpm-workspace.yaml does not pin it back: 4.3.2 satisfies that range. Both holds want their own ticket; chore(deps): next 16.2.6 carries a reachable Server Actions DoS, and sharp needs an out-of-range bump #721 is the natural place to record them, and that is a call for @Ardnived rather than something this PR should widen to cover.

Refs #721

🤖 Written by the sydevs autonomous loop — see what this is

🤖 Generated with Claude Code

https://claude.ai/code/session_016i6UGeRbzyfgnctnYJhbKH

@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-732 September 8, 2026 01:22 Destroyed
@railway-app

railway-app Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-732 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Sep 8, 2026 at 6:10 pm UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

Right shape, right size. One file changes, the manifest stays untouched, and the core claim holds: OSV lists four HIGH advisories against next 16.2.6 and none against 16.2.11. Narrowing #721's blanket refresh to next alone is the better call. No finding asks for code to change. All three concern the body, which on a lockfile-only PR is the reviewable surface.

Findings

  • should-fix — js-yaml is held back as a bump "with no advisory". 4.3.0 carries a HIGH one. Line 124.
  • should-fix — "it clears none of them" is wrong. Four of the 22 move in this diff. Line 3466.
  • consider — about 20 collateral bumps and a new native optional dependency. Line 1296.

What was checked — #721, the PR body, git diff origin/main...HEAD. Every packages: key diffed against main: 107 removed, 124 added. The parent of each surviving vulnerable copy traced. package.json, .node-version, ci.yml. The three Server Action files behind the reachability claim take no auth. OSV queried for eight packages. Both checks green.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread pnpm-lock.yaml Resolved
Comment thread pnpm-lock.yaml Resolved
Comment thread pnpm-lock.yaml Resolved
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

All three review threads answered. Body only — no code changed, so the commit stays 78b0d6c and CI is untouched.

Both should-fix findings were correct. Both were body claims, not lockfile mistakes:

  • js-yaml is not advisory-free. 4.3.0 carries GHSA-5p4m-2wfm-xmqj (HIGH), confirmed against OSV. The body now states it, names the path js-yaml ships on, and gives the real reason the hold is safe: every consumer parses repo-local schema files, never request input.
  • "It clears none of them" was right about the total, wrong about the reason. Four of the 22 gain a patched copy here. The vulnerable copies survive under three pinned parents, now named.

The security claim is measured now. pnpm audit --audit-level=high ran against origin/main and against this branch. A per-package table replaces the prose: next 4 → 0, everything else unchanged, 26 → 22 high.

A new What else moves section names the collateral re-resolutions and the new native optional dependency.

@Ardnived — both held-back packages want a ticket. #721 is the place.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

GHSA-m99w-x7hq-7vfj is a denial of service in App Router Server Actions.
It is reachable here: three public, unauthenticated Server Actions live at
registrations/feedback, registrations/unsubscribe and events/verify.

package.json already declares ^16.2.6, so the fix needs only a lockfile
refresh. The manifest is untouched.

This clears all four next advisories that applied to 16.2.6 — the other
three (custom-server SSRF, rewrites SSRF, Turbopack middleware bypass)
were unreachable, but they go with the same bump. High advisories drop
from 26 to 22.

A blanket `pnpm update` was tried first and rejected: it broke the tree
twice. js-yaml 4.3.0 -> 4.3.2 drops the `binaryTag` export that
@apidevtools/json-schema-ref-parser imports, failing three integration
suites; rrule-temporal 1.4.5 -> 1.6.0 retypes its API against
temporal-spec, which does not unify with @js-temporal/polyfill and fails
typecheck. Both are unrelated to any advisory, so neither is bumped here.

The remaining 22 high advisories are transitives under payload, next and
the build chain. They do not move with this bump, contrary to what the
ticket expected — each needs its parent to re-resolve.

Refs #721

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016i6UGeRbzyfgnctnYJhbKH
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Superseded by #741, which bumps next straight to 16.3.4. Closing.

16.2.11 leaves two critical unauthenticated RCE advisories open — GHSA-2xp9-vwfh-vxw4 (Image Optimization API) and GHSA-p293-qw3h-jr36 (Windows hosts) — both >=16.0.0 <16.3.3. That is the reason for going past this PR's target rather than merging it first.

#741 also carries the sharp half from #735, with no overrides entry: [email protected] declares sharp: ^0.35.4 itself.

Two notes from here survive and are quoted on #741: the js-yaml hold (4.3.2 drops the binaryTag export @apidevtools/json-schema-ref-parser imports), and VITEST_INT_MAX_FORKS=2 for the integration lane. The @napi-rs/lzma-linux-x64-gnu concern does not — that package is absent from #741's tree.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot closed this Sep 9, 2026
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Sep 9, 2026
Ardnived pushed a commit that referenced this pull request Sep 9, 2026
…and #735 (#741)

* chore(deps): bump next to 16.3.4 and sharp to 0.35.4

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

* docs: say Next.js 16, not 15

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

---------

Co-authored-by: sydevs-bot <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-732 — 55b821a7 Deployed Sep 8, 2026 by railway-app[bot]
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.

3 participants