
# Next.js 16.2.4 で picomatch 4.0.3(CVE-2026-33671)をバンドルする際の最小再現
最小再現: Next.js 16.2.4 には picomatch 4.0.3 が node_modules/next/dist/compiled/picomatch/ にベンダリングされて同梱されており、CVE-2026-33671 (HIGH) の影響を受けます。npm の overrides ではバンドルされたコピーに到達できません。
npm install
cat node_modules/next/dist/compiled/picomatch/package.json
# → {"name":"picomatch","main":"index.js",...} (version フィールドは削除済み)
npx next build
docker build -t next-picomatch-repro .
trivy image next-picomatch-repro
期待される出力:
picomatch (package.json) | CVE-2026-33671 | HIGH | fixed | 4.0.3 | 4.0.4
overrides が役に立たないことを証明package.json に以下を追加できます:
"overrides": {
"picomatch": "4.0.4"
}
これにより node_modules/[email protected] は正しくインストールされますが、node_modules/next/dist/compiled/picomatch/ は Next.js 自身の tarball 内にバンドルされているため 4.0.3 のままです。
Next.js が picomatch ≥ 4.0.4 から dist/compiled/picomatch/ を再バンドルしたパッチリリースを公開することです。下流の利用者は通常の npm install でそれを取得できます。