Skip to content

security: hotfix critical runtime advisories on main - #79

Merged
yufoxda merged 1 commit into
mainfrom
claude/epic-wright-9zzc8u-hotfix
Nov 1, 2026
Merged

yufoxda merged 1 commit into
mainfrom
claude/epic-wright-9zzc8u-hotfix

Conversation

@yufoxda

@yufoxda yufoxda commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

本番に残っている critical な脆弱性を塞ぐための hotfix です。

背景

本番は main で動いています。main は develop より 52 コミット遅れているため、develop で入れた依存関係の修正(#75 、bf6eb45、#78 )が本番には届いていません。かといって develop を丸ごとリリースすると、ロール用の migration など未リリースの変更まで本番に出てしまいます。そこで、main のバージョンを起点に、脆弱性を塞ぐのに必要な変更だけを入れました。

変更

パッケージ 変更 深刻度
next 16.2.10 → 16.4.3(完全固定は維持) critical:Image Optimization / use cache の認証不要 RCE
better-auth 1.6.23 → 1.7.15 critical:他人としてサインインできる
zod → 4.6.7 high
hono → 4.13.16 moderate
postcss / sharp override を ^8.5.23 / ^0.35.3 に変更 high

develop の bf6eb45 と同じ変更(レビュー済み)

  • @opennextjs/cloudflare を devDependencies に移しました。使っているのは next.config.ts・open-next.config.ts・ビルド用スクリプトだけで、src からは読み込まれていません。これにより、wrangler・miniflare・glob 系の脆弱性が実行時の依存関係から外れます
  • postcss の override を、脆弱性のある 8.5.13 から ^8.5.23 に変えました

更新しなかったもの

  • community の drizzle-kit 経由の esbuild 系(moderate)。修正には互換性を壊すダウングレードが必要なためで、develop と同じ扱いです

better-auth は minor 更新なので、better-auth が要求する DB スキーマを新旧で比べ、差分がないことを確認しました。

検証(手元で、main の CI と同じ手順)

audit (high) テスト 型チェック その他
member 0 件 3 件すべて成功 OK wrangler deploy --dry-run OK
community 0 件(moderate 4 件は上記) 14 件成功 / 1 件スキップ OK wrangler deploy --dry-run OK
frontend 0 件 7 件すべて成功 OK lint OK(警告 1 件:MemberTable の TanStack Table。#75 と同じもの)、opennextjs-cloudflare build OK

マージ後に必要なこと

  • デプロイは手動です。 マージしただけでは本番は変わりません
  • まだ確かめていないこと:新しいバージョンで実際にログインしてみる確認。デプロイ前か直後に、ログインの流れを一度試してください
  • 次に develop を main にリリースするとき、frontend/package.json と各 lockfile で競合が出る可能性があります。develop 側を採用すれば解決します(develop は同じかそれ以上新しいバージョンです)

Generated by Claude Code

Production runs main, which is 52 commits behind develop, so the dependency
fixes merged there (#75, bf6eb45, #78) have not reached it. Releasing develop
would ship unreleased work such as the role migrations, so this applies only
what closing the advisories needs, on main's own versions.

- next 16.2.10 -> 16.4.3 (critical: unauthenticated RCE in Image Optimization
  and `use cache`). Pinned exactly, as before.
- better-auth 1.6.23 -> 1.7.15 (critical: sign-in as another user). The
  schema it requires is unchanged between the two versions.
- zod -> 4.6.7 (high), hono -> 4.13.16 (moderate), plus transitive fixes.
- Same changes as develop's bf6eb45, already reviewed there:
  @opennextjs/cloudflare moves to devDependencies (only next.config.ts,
  open-next.config.ts and the build scripts use it), the postcss override
  moves from the vulnerable 8.5.13 to ^8.5.23, and sharp is pinned to
  ^0.35.3.

Left alone: drizzle-kit's esbuild chain in community (moderate, fix is a
breaking downgrade), as on develop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vm1iXpgdwQfcWuyNzX9KF7
@yufoxda
yufoxda merged commit ec29d8f into main Nov 1, 2026
2 checks passed
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.

2 participants