
Next.jsプロジェクトを2026年10月14日のNext.jsセキュリティアドバイザリに対して、依存関係なしの1コマンドでチェックします:
sharp経由(critical)use cache関数におけるリモートコード実行(critical、Next.js 16)package.jsonの範囲ではなく、node_modulesに実際にインストールされているバージョン(npm、pnpm、yarnのレイアウト、ネストされたコピーを含む)を読み取り、ソースを"use cache"、"use server"、next/imageについてスキャンします。
詳細な解説: Next.js security update, October 2026
Node.js 18以降が必要です。パッケージをインストールした後、プロジェクトのルートで実行してください:
curl -O https://raw.githubusercontent.com/AmanSin001/next-security-check/main/next-security-check.mjs
node next-security-check.mjs # current folder
node next-security-check.mjs ./my-app # or a path
echo $? # 0 = nothing to do, 1 = action needed
Server Actionsとnext/imageを備えたNext.js 16.3.0の実際のインストール環境:
Next.js security check (October 14, 2026 advisories)
next: 16.3.0
sharp: 0.35.3
features: App Router yes, "use cache" no, Server Actions yes, next/image yes
FIX CVE-2026-96889 Image Optimization RCE with SVG (critical)
your app uses next/image. sharp 0.35.3 installed; needs 0.35.5+.
Fix: next 16.4.1, or sharp 0.35.5+ for every copy
FIX GHSA-673q-mjm6-r5xr use cache RCE (critical, Next.js 16)
no "use cache" found; Vercel still says upgrade
Fix: next 16.4.1
FIX GHSA-p3m5-59mp-jv5r Server Actions denial of service (high)
your code has "use server"
Fix: next 16.4.1
ok GHSA-xqc2-xf4c-x3h3 React Server Components packages (critical)
not installed directly (Next.js bundles its own)
Action needed: upgrade, reinstall, rebuild and redeploy.
Next.js 15.5.28は依然としてsharp ^0.34.3を受け入れ、0.34系には修正版リリースがありません。sharpが自身のpackage.jsonにあるか、ロックファイルに固定されている場合、Next.jsをアップグレードしてもそのまま残ります。チェッカーはこれを検出し、npm install sharp@^0.35.5を提案します。
| 系統 | 修正版リリース |
|---|---|
| Next.js 16 | 16.4.1 |
| Next.js 15 | 15.5.28 |
| sharp | 0.35.5以降 |
| react-server-dom-* | 19.0.9、19.1.10、19.2.9、19.3.1 |
node --test next-security-check.test.mjs
pnpmの.pnpmレイアウト、シンボリックリンク、15.xのsharpの罠、Pages Routerアプリを含む8つのケース。
app、src、pages、components、libを対象とします。ビルド時に生成されたコードや別のパッケージ内にあるコードは検出されません。疑わしい場合はアップグレードしてください。MIT。修正作業が必要ですか? CodeWares。