Merge claude/next-16-4-6: Next.js 16.4.6, minimum safe 16.4.5 (GHSA-mfr8-8qww-v76h)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -8,6 +8,29 @@ versions at once, go through every "Requires project changes" section in order,
|
||||
version you have. A new release = a new section at the top; we remove the oldest ones only
|
||||
once there are more than 20.
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Security
|
||||
- **Next.js 16.4.6; the minimum safe version is now 16.4.5.** Next.js 16.3.0–16.4.4 is affected by
|
||||
[GHSA-mfr8-8qww-v76h](https://github.com/advisories/GHSA-mfr8-8qww-v76h) (CVE-2026-119790, moderate): information
|
||||
disclosure across root params when a `'use cache'` function is called through `unstable_cache()`. Fixed in 16.4.5.
|
||||
This is the advisory behind the `pnpm dev` warning "Next.js 16.4.3 is affected by a known security vulnerability".
|
||||
The plugin's dev dependencies (`next`, `eslint-config-next`), the reference site and the project starter move to
|
||||
16.4.6. The Next.js 15 lines Payload 3.90 accepts are not affected by this advisory but still carry older critical
|
||||
ones, so 16.4.x stays the only safe line. The plugin's peer range is unchanged (`next >=15`).
|
||||
|
||||
### Changed
|
||||
- **ipal-doctor `next-min`** now reports `next` below 16.4.5 as an error, naming GHSA-mfr8-8qww-v76h (below 16.4.1 it
|
||||
still names the RCE and DoS advisories). The fix it prints: `pnpm add [email protected] [email protected]`. It can
|
||||
be silenced in `ipal-doctor.json` as before (`"next-min": { "off": true, "reason": "…" }`).
|
||||
- AGENT.md §4 item 11, the `ipal-setup` and `ipal-upgrade` skills and doctor.md state 16.4.5 as the minimum.
|
||||
|
||||
### What projects must update
|
||||
- **Every client site below Next.js 16.4.5:** `pnpm add [email protected] [email protected]`, `rm -rf .next`,
|
||||
`pnpm build`, commit the lockfile and redeploy on Coolify. `pnpm ls next` → 16.4.6; `pnpm exec ipal-doctor` → no
|
||||
`next-min` finding; `pnpm dev` prints no security warning. No plugin option, migration or import map change.
|
||||
- `pnpm ipal:skills` brings the updated `ipal-setup` / `ipal-upgrade` skills.
|
||||
|
||||
## 1.16.0
|
||||
|
||||
### Added
|
||||
|
||||
+9
-5
@@ -505,11 +505,15 @@ No abbreviations (`HeroSection`, not `HeroSec`). Do not create `lib/pages.ts`,
|
||||
9. **RSC by default.** `'use client'` only for state/interaction, in a separate file;
|
||||
the section stays a server component and passes data to it. Secrets: `import 'server-only'`.
|
||||
10. **Blocks do not import `lib/*`** (cycle). Server-side data → `enhanceProps`.
|
||||
11. **Next.js 16.4.1 or later** (minimum safe version). 16.0.0–16.4.0 have unauthenticated RCE and DoS
|
||||
advisories (GHSA-2464-fhr4-w9xw, GHSA-673q-mjm6-r5xr, GHSA-p3m5-59mp-jv5r); Payload supports no patched
|
||||
15.x line. Pin `next` and `eslint-config-next` to the same 16.4.x (≥ 16.4.1) and make sure `sharp` resolves to
|
||||
0.35.5 or later (`pnpm why sharp`). The plugin's peer range stays open (`next >=15`) — the minimum is yours to keep.
|
||||
**Check:** `pnpm ls next sharp` → next ≥ 16.4.1, sharp ≥ 0.35.5; `pnpm dev` prints no security-upgrade warning.
|
||||
11. **Next.js 16.4.5 or later** (minimum safe version; the plugin, the reference site and the starter use 16.4.6).
|
||||
16.0.0–16.4.0 have unauthenticated RCE and DoS advisories (GHSA-2464-fhr4-w9xw, GHSA-673q-mjm6-r5xr,
|
||||
GHSA-p3m5-59mp-jv5r); 16.3.0–16.4.4 have GHSA-mfr8-8qww-v76h (information disclosure across root params when a
|
||||
`'use cache'` function is called through `unstable_cache()`, moderate; fixed in 16.4.5). Payload supports no
|
||||
patched 15.x line. Pin `next` and `eslint-config-next` to the same 16.4.x (≥ 16.4.5):
|
||||
`pnpm add [email protected] [email protected]`, and make sure `sharp` resolves to 0.35.5 or later
|
||||
(`pnpm why sharp`). The plugin's peer range stays open (`next >=15`) — the minimum is yours to keep.
|
||||
**Check:** `pnpm ls next sharp` → next ≥ 16.4.5, sharp ≥ 0.35.5; `pnpm exec ipal-doctor` → no `next-min`
|
||||
finding; `pnpm dev` prints no security-upgrade warning.
|
||||
12. **No open production advisories.** Node.js 20 or later (the plugin's `nodemailer` 10 requires it). Run
|
||||
`pnpm audit --prod`. The plugin's own dependencies are clean; what remains comes from Payload's tree, which only
|
||||
the project's lockfile can fix. With `payload` 3.90.x three packages are pinned exactly and need `pnpm.overrides`
|
||||
|
||||
@@ -93,8 +93,9 @@ legacy-peer-deps=true
|
||||
pnpm add @intecion/ipal-kit @payloadcms/plugin-seo @payloadcms/plugin-form-builder \
|
||||
@payloadcms/storage-s3 @clocklimited/payload-2fa@3.0.0-beta.7 tailwindcss @tailwindcss/postcss
|
||||
```
|
||||
**Next.js 16.4.1 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, AGENT.md §4 item 11):
|
||||
`pnpm add next@^16.4.1 eslint-config-next@^16.4.1 sharp@^0.35.5` when create-payload-app gave you an older one.
|
||||
**Next.js 16.4.5 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, 16.3.0–16.4.4 have
|
||||
GHSA-mfr8-8qww-v76h — AGENT.md §4 item 11): `pnpm add [email protected].6 [email protected].6 sharp@^0.35.5` when
|
||||
create-payload-app gave you an older one.
|
||||
**Node.js 20 or later** (the plugin's `nodemailer` 10 requires it). After the install, `pnpm audit --prod` → no high or
|
||||
critical; with `payload` 3.90.x add the `dompurify`, `graphql-scalars` and `undici` overrides from AGENT.md §4 item 12.
|
||||
`nodemailer`, `lucide-react`, `slugify`, `server-only` come with the plugin — do not add them (your own
|
||||
@@ -104,7 +105,7 @@ plugin-seo, plugin-form-builder, storage-s3) in `pnpm.overrides` **to the exact
|
||||
`"build": "cross-env NODE_OPTIONS=\"--max-old-space-size=3072\" next build --webpack"`.
|
||||
|
||||
**Check.** `ls node_modules/@intecion/ipal-kit/docs/agent/AGENT.md` exists;
|
||||
`pnpm ls payload @payloadcms/ui @payloadcms/plugin-seo` — one, identical version; `pnpm ls next sharp` → next ≥ 16.4.1,
|
||||
`pnpm ls payload @payloadcms/ui @payloadcms/plugin-seo` — one, identical version; `pnpm ls next sharp` → next ≥ 16.4.5,
|
||||
sharp ≥ 0.35.5; `ls src/middleware.ts` → not found.
|
||||
404 on `pnpm add` = missing `@intecion:registry` line; 401 = stale `_authToken` in `~/.npmrc` (PROGRAMISTA §1).
|
||||
|
||||
|
||||
@@ -82,9 +82,10 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
|
||||
`buildGlobalRevalidateHook({ revalidatePath })`; `consentFieldName` passed only because the option was ignored →
|
||||
`forms.consentFieldName` works now; your own seed guard / upsert code → `@intecion/ipal-kit/seed` (`createSeeder`).
|
||||
|
||||
**Every upgrade — Next.js 16.4.1 or later** (AGENT.md §4 item 11): `pnpm ls next sharp`; below 16.4.1 →
|
||||
`pnpm add next@^16.4.1 eslint-config-next@^16.4.1 sharp@^0.35.5`, `rm -rf .next`, build, redeploy on Coolify
|
||||
(a new image ships the fixed next and sharp). **Check:** `pnpm dev` prints no security-upgrade warning.
|
||||
**Every upgrade — Next.js 16.4.5 or later** (AGENT.md §4 item 11): `pnpm ls next sharp`; below 16.4.5 →
|
||||
`pnpm add [email protected].6 [email protected].6 sharp@^0.35.5`, `rm -rf .next`, build, redeploy on Coolify
|
||||
(a new image ships the fixed next and sharp). **Check:** `pnpm exec ipal-doctor` → no `next-min` finding; `pnpm dev`
|
||||
prints no security-upgrade warning.
|
||||
|
||||
**Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; with `payload` 3.90.x add the
|
||||
`dompurify`, `graphql-scalars` and `undici` overrides, `pnpm install`, audit again. **Check:** no high or critical (the
|
||||
@@ -98,7 +99,7 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
|
||||
`engines`. Remove `nodemailer` and `@types/nodemailer` from the project's own `package.json` if someone added them
|
||||
(the plugin's copy is the one `mailAdapter` uses). **Check:** Site integrations → E-mail sending → send a test
|
||||
e-mail over SMTP (and over Microsoft Graph when the project uses it).
|
||||
3. **Next.js 16.4.1 or later** — the "Every upgrade — Next.js" step above (`next@^16.4.3`, `sharp@^0.35.5`).
|
||||
3. **Next.js** — the "Every upgrade — Next.js" step above (today 16.4.5 or later, `sharp@^0.35.5`).
|
||||
4. **Dependency advisories** — the "Every upgrade — dependency advisories" step above (`dompurify` / `graphql-scalars` /
|
||||
`undici` overrides on payload 3.90.x). **Check:** `pnpm audit --prod` → no high or critical.
|
||||
5. **Cookie list kept by hand** → offer `cookieScanner: true` (+ `crawl: true` with `IPAL_COOKIE_SCAN_URL`,
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ Turn off: `ipalKit({ doctor: false })`. Adapt: `ipalKit({ doctor: { tokenVar: 'M
|
||||
|---|---|---|---|
|
||||
| versions | `plugin-installed` | error | `node_modules` has `@intecion/ipal-kit` and it satisfies `package.json` |
|
||||
| | `plugin-latest` | warning; error two or more minors behind | the installed plugin is the newest on the team registry (registry) |
|
||||
| | `next-min` | error | `next` ≥ 16.4.1; `eslint-config-next` on the same minor (warning) |
|
||||
| | `next-min` | error | `next` ≥ 16.4.5 (below 16.4.1: RCE/DoS advisories; 16.3.0–16.4.4: GHSA-mfr8-8qww-v76h); `eslint-config-next` on the same minor (warning) |
|
||||
| | `sharp-min` | error | `sharp` ≥ 0.35.5 |
|
||||
| | `node-22` | warning | `engines.node` only 22 (`">=22 <23"`), `.nvmrc` / `.node-version` = 22; with `--deep`, the running Node |
|
||||
| | `pnpm-pinned` | info | `packageManager` is set |
|
||||
|
||||
+2
-2
@@ -168,9 +168,9 @@
|
||||
"copyfiles": "2.4.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.23.0",
|
||||
"eslint-config-next": "16.4.3",
|
||||
"eslint-config-next": "16.4.6",
|
||||
"graphql": "^16.8.1",
|
||||
"next": "16.4.3",
|
||||
"next": "16.4.6",
|
||||
"open": "^10.1.0",
|
||||
"payload": "3.90.2",
|
||||
"prettier": "^3.4.2",
|
||||
|
||||
Generated
+77
-82
@@ -93,8 +93,9 @@ legacy-peer-deps=true
|
||||
pnpm add @intecion/ipal-kit @payloadcms/plugin-seo @payloadcms/plugin-form-builder \
|
||||
@payloadcms/storage-s3 @clocklimited/payload-2fa@3.0.0-beta.7 tailwindcss @tailwindcss/postcss
|
||||
```
|
||||
**Next.js 16.4.1 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, AGENT.md §4 item 11):
|
||||
`pnpm add next@^16.4.1 eslint-config-next@^16.4.1 sharp@^0.35.5` when create-payload-app gave you an older one.
|
||||
**Next.js 16.4.5 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, 16.3.0–16.4.4 have
|
||||
GHSA-mfr8-8qww-v76h — AGENT.md §4 item 11): `pnpm add [email protected].6 [email protected].6 sharp@^0.35.5` when
|
||||
create-payload-app gave you an older one.
|
||||
**Node.js 20 or later** (the plugin's `nodemailer` 10 requires it). After the install, `pnpm audit --prod` → no high or
|
||||
critical; with `payload` 3.90.x add the `dompurify`, `graphql-scalars` and `undici` overrides from AGENT.md §4 item 12.
|
||||
`nodemailer`, `lucide-react`, `slugify`, `server-only` come with the plugin — do not add them (your own
|
||||
@@ -104,7 +105,7 @@ plugin-seo, plugin-form-builder, storage-s3) in `pnpm.overrides` **to the exact
|
||||
`"build": "cross-env NODE_OPTIONS=\"--max-old-space-size=3072\" next build --webpack"`.
|
||||
|
||||
**Check.** `ls node_modules/@intecion/ipal-kit/docs/agent/AGENT.md` exists;
|
||||
`pnpm ls payload @payloadcms/ui @payloadcms/plugin-seo` — one, identical version; `pnpm ls next sharp` → next ≥ 16.4.1,
|
||||
`pnpm ls payload @payloadcms/ui @payloadcms/plugin-seo` — one, identical version; `pnpm ls next sharp` → next ≥ 16.4.5,
|
||||
sharp ≥ 0.35.5; `ls src/middleware.ts` → not found.
|
||||
404 on `pnpm add` = missing `@intecion:registry` line; 401 = stale `_authToken` in `~/.npmrc` (PROGRAMISTA §1).
|
||||
|
||||
|
||||
@@ -82,9 +82,10 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
|
||||
`buildGlobalRevalidateHook({ revalidatePath })`; `consentFieldName` passed only because the option was ignored →
|
||||
`forms.consentFieldName` works now; your own seed guard / upsert code → `@intecion/ipal-kit/seed` (`createSeeder`).
|
||||
|
||||
**Every upgrade — Next.js 16.4.1 or later** (AGENT.md §4 item 11): `pnpm ls next sharp`; below 16.4.1 →
|
||||
`pnpm add next@^16.4.1 eslint-config-next@^16.4.1 sharp@^0.35.5`, `rm -rf .next`, build, redeploy on Coolify
|
||||
(a new image ships the fixed next and sharp). **Check:** `pnpm dev` prints no security-upgrade warning.
|
||||
**Every upgrade — Next.js 16.4.5 or later** (AGENT.md §4 item 11): `pnpm ls next sharp`; below 16.4.5 →
|
||||
`pnpm add [email protected].6 [email protected].6 sharp@^0.35.5`, `rm -rf .next`, build, redeploy on Coolify
|
||||
(a new image ships the fixed next and sharp). **Check:** `pnpm exec ipal-doctor` → no `next-min` finding; `pnpm dev`
|
||||
prints no security-upgrade warning.
|
||||
|
||||
**Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; with `payload` 3.90.x add the
|
||||
`dompurify`, `graphql-scalars` and `undici` overrides, `pnpm install`, audit again. **Check:** no high or critical (the
|
||||
@@ -98,7 +99,7 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
|
||||
`engines`. Remove `nodemailer` and `@types/nodemailer` from the project's own `package.json` if someone added them
|
||||
(the plugin's copy is the one `mailAdapter` uses). **Check:** Site integrations → E-mail sending → send a test
|
||||
e-mail over SMTP (and over Microsoft Graph when the project uses it).
|
||||
3. **Next.js 16.4.1 or later** — the "Every upgrade — Next.js" step above (`next@^16.4.3`, `sharp@^0.35.5`).
|
||||
3. **Next.js** — the "Every upgrade — Next.js" step above (today 16.4.5 or later, `sharp@^0.35.5`).
|
||||
4. **Dependency advisories** — the "Every upgrade — dependency advisories" step above (`dompurify` / `graphql-scalars` /
|
||||
`undici` overrides on payload 3.90.x). **Check:** `pnpm audit --prod` → no high or critical.
|
||||
5. **Cookie list kept by hand** → offer `cookieScanner: true` (+ `crawl: true` with `IPAL_COOKIE_SCAN_URL`,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"@payloadcms/ui": "3.90.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"graphql": "^16.8.1",
|
||||
"next": "16.4.3",
|
||||
"next": "16.4.6",
|
||||
"payload": "3.90.2",
|
||||
"react": "19.3.0",
|
||||
"react-dom": "19.3.0",
|
||||
|
||||
Generated
+77
-77
@@ -3,6 +3,10 @@ import type { DoctorRule, RuleFinding } from '../types.js'
|
||||
import { compareVersions, isSemverSpec, lt, parseVersion, run } from '../util.js'
|
||||
|
||||
const PKG = '@intecion/ipal-kit'
|
||||
/** Lowest Next.js without a known advisory: 16.4.5 fixes GHSA-mfr8-8qww-v76h (16.3.0–16.4.4). */
|
||||
export const NEXT_MIN_SAFE = '16.4.5'
|
||||
/** The version the plugin, the reference site and the starter use. */
|
||||
export const NEXT_RECOMMENDED = '16.4.6'
|
||||
|
||||
export const versionRules: DoctorRule[] = [
|
||||
{
|
||||
@@ -26,7 +30,13 @@ export const versionRules: DoctorRule[] = [
|
||||
const out: RuleFinding[] = []
|
||||
const next = ctx.installed('next')
|
||||
if (!next) {return [{ fix: 'pnpm install', message: 'next is not installed', severity: 'error' }]}
|
||||
if (lt(next, '16.4.1')) {out.push({ fix: 'pnpm add [email protected] [email protected]', message: `next ${next} < 16.4.1 (RCE and DoS advisories)`, severity: 'error' })}
|
||||
// The minimum safe version and the advisories behind it (AGENT.md §4 item 11).
|
||||
if (lt(next, NEXT_MIN_SAFE)) {
|
||||
const why = lt(next, '16.4.1')
|
||||
? 'RCE and DoS advisories, and GHSA-mfr8-8qww-v76h'
|
||||
: 'GHSA-mfr8-8qww-v76h: information disclosure across root params in \'use cache\''
|
||||
out.push({ fix: `pnpm add next@${NEXT_RECOMMENDED} eslint-config-next@${NEXT_RECOMMENDED}`, message: `next ${next} < ${NEXT_MIN_SAFE} (${why})`, severity: 'error' })
|
||||
}
|
||||
const eslint = ctx.installed('eslint-config-next')
|
||||
if (eslint && parseVersion(eslint)?.slice(0, 2).join('.') !== parseVersion(next)?.slice(0, 2).join('.')) {
|
||||
out.push({ fix: `pnpm add -D eslint-config-next@${next}`, message: `eslint-config-next ${eslint} is not on next's ${next}`, severity: 'warning' })
|
||||
|
||||
+15
-2
@@ -31,11 +31,11 @@ function project(files: Record<string, object | string>): string {
|
||||
return root
|
||||
}
|
||||
|
||||
const pkgJson = (extra: object = {}) => ({ name: 'examplepl-web', dependencies: { '@intecion/ipal-kit': '^1.14.6', next: '16.4.3', sharp: '0.35.5' }, engines: { node: '>=22 <23' }, packageManager: '[email protected]', ...extra })
|
||||
const pkgJson = (extra: object = {}) => ({ name: 'examplepl-web', dependencies: { '@intecion/ipal-kit': '^1.14.6', next: '16.4.6', sharp: '0.35.5' }, engines: { node: '>=22 <23' }, packageManager: '[email protected]', ...extra })
|
||||
const installed = (name: string, version: string) => ({ [`node_modules/${name}/package.json`]: { name, version } })
|
||||
const base = () => ({
|
||||
...installed('@intecion/ipal-kit', '1.14.6'),
|
||||
...installed('next', '16.4.3'),
|
||||
...installed('next', '16.4.6'),
|
||||
...installed('sharp', '0.35.5'),
|
||||
'.nvmrc': '22\n',
|
||||
'package.json': pkgJson(),
|
||||
@@ -120,6 +120,19 @@ describe('versions', () => {
|
||||
'pnpm-pinned:info',
|
||||
])
|
||||
})
|
||||
test('next-min: 16.4.1–16.4.4 is an error (GHSA-mfr8-8qww-v76h), 16.4.5 passes, and the rule can be silenced', async () => {
|
||||
const at = (version: string) => project({ ...base(), ...installed('next', version), ...installed('eslint-config-next', version) })
|
||||
const old = await doctor(at('16.4.3'), ['next-min'])
|
||||
expect(rules(old)).toEqual(['next-min:error'])
|
||||
expect(old.findings[0].message).toContain('GHSA-mfr8-8qww-v76h')
|
||||
expect(old.findings[0].fix).toBe('pnpm add [email protected] [email protected]')
|
||||
expect(rules(await doctor(at('16.4.4'), ['next-min']))).toEqual(['next-min:error'])
|
||||
expect((await doctor(at('16.4.0'), ['next-min'])).findings[0].message).toContain('RCE and DoS')
|
||||
expect(rules(await doctor(at('16.4.5'), ['next-min']))).toEqual([])
|
||||
expect(rules(await doctor(at('16.5.0'), ['next-min']))).toEqual([])
|
||||
const silenced = await doctor(at('16.4.3'), ['next-min'], { config: { rules: { 'next-min': { off: true, reason: 'upgrade booked' } } } })
|
||||
expect(silenced.summary).toMatchObject({ error: 0, silenced: 1 })
|
||||
})
|
||||
test('file: / link: specs are not compared', async () => {
|
||||
expect(rules(await doctor(project({ ...base(), 'package.json': pkgJson({ dependencies: { '@intecion/ipal-kit': 'file:..' } }) }), ['plugin-installed']))).toEqual([])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user