Security: override graphql-scalars to ^2.0.1 (GHSA-x8rm-f576-gq67)

@payloadcms/graphql pins graphql-scalars 1.22.2 up to the latest Payload
(3.92.1), so no Payload upgrade fixes the high PhoneNumber ReDoS advisory.
Repo-only pnpm.overrides entry "graphql-scalars@<2.0.1": "^2.0.1" (not passed
to projects). Payload only imports DateTimeResolver and EmailAddressResolver;
checked against the dev app's /api/graphql: login, DateTime and EmailAddress
as input and output, a JSON field, and an invalid e-mail rejected.

pnpm audit --prod: 1 high + 1 low -> 1 low (deepmerge, no fix published).
Docs: AGENT.md §4 item 12, ipal-setup, ipal-upgrade, README, CHANGELOG
Unreleased recommend the same override to projects.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 11:50:51 +01:00
co-authored by Claude Opus 5.5
parent f57d089f55
commit 927798105e
7 changed files with 93 additions and 14 deletions
+10 -3
View File
@@ -418,18 +418,25 @@ No abbreviations (`HeroSection`, not `HeroSec`). Do not create `lib/pages.ts`,
**Check:** `pnpm ls next sharp` → next ≥ 16.4.1, sharp ≥ 0.35.5; `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 two packages are pinned exactly and need `pnpm.overrides`
the project's lockfile can fix. With `payload` 3.90.x three packages are pinned exactly and need `pnpm.overrides`
next to the `@payloadcms/*` ones:
```json
"dompurify@<3.4.17": "^3.4.17",
"graphql-scalars@<2.0.1": "^2.0.1",
"undici@>=7 <7.30.1": "^7.30.1"
```
`undici` comes from `payload` (3.92.1 and later already ship 7.30.1), `dompurify` from the admin code editor
(`@payloadcms/ui` → `monaco-editor`, which pins 3.2.7). Everything else in the report (`fast-uri`, `js-yaml`,
(`@payloadcms/ui` → `monaco-editor`, which pins 3.2.7). `graphql-scalars` comes from `@payloadcms/graphql`, which
pins 1.22.2 up to the latest Payload (3.92.1); every version up to 2.0.0 has a high ReDoS advisory in the
`PhoneNumber` scalar (GHSA-x8rm-f576-gq67). 2.x is a major (graphql-js 16+, Node.js 22 recommended), but Payload
only uses `DateTimeResolver` and `EmailAddressResolver`, which work unchanged — keep the override until Payload
ships 2.0.1 or later. `deepmerge` (low, from `payload`) has no fixed version yet; it stays in the report. Everything else in the report (`fast-uri`, `js-yaml`,
`browserslist`, `source-map-js`, `fast-copy`, `baseline-browser-mapping`) is a range: `pnpm update` or a fresh
lockfile picks up the fix; add an override like the ones above only if it does not. These are recommendations —
the plugin forces none of them. Never add a project dependency on `nodemailer` or `@types/nodemailer`.
**Check:** `pnpm audit --prod` → no high or critical; `pnpm why undici dompurify` → only the fixed versions.
**Check:** `pnpm audit --prod` → no high or critical (only the `deepmerge` low may remain);
`pnpm why undici dompurify graphql-scalars` → only the fixed versions; with GraphQL in use, a query that reads a
`createdAt` (DateTime) and filters on `email` (EmailAddress) returns data.
---
+1 -1
View File
@@ -42,7 +42,7 @@ pnpm add @intecion/ipal-kit @payloadcms/plugin-seo @payloadcms/plugin-form-build
**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.
**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` and `undici` overrides from AGENT.md §4 item 12.
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
`lucide-react` only `~0.400.0`). In `package.json`: pin every `@payloadcms/*` (ui, next, db-*, richtext-lexical,
plugin-seo, plugin-form-builder, storage-s3) in `pnpm.overrides` **to the exact `payload` version**, then
+4 -3
View File
@@ -87,7 +87,8 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
(a new image ships the fixed next and sharp). **Check:** `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` and `undici` overrides, `pnpm install`, audit again. **Check:** no high or critical.
`dompurify`, `graphql-scalars` and `undici` overrides, `pnpm install`, audit again. **Check:** no high or critical (the
`deepmerge` low has no fix yet).
**→ 1.14.0 (PROGRAMISTA §6, items 48–49; CHANGELOG "What projects must update" — do all 8, in order):**
1. `pnpm payload generate:importmap` — `@intecion/ipal-kit/admin#FaviconCheck` (hint under Site settings → Site icon)
@@ -98,8 +99,8 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
(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`).
4. **Dependency advisories** — the "Every upgrade — dependency advisories" step above (`dompurify` / `undici` overrides
on payload 3.90.x). **Check:** `pnpm audit --prod` → no high or critical.
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`,
`IPAL_COOKIE_SCAN_TOKEN` and the site in the service's `IPAL_CRAWLER_SITES`, cookie-scanner.md); an own image modal →
`lightbox: true` + `<SiteProviders lightbox>` (PROGRAMISTA item 48). Turning either on → Postgres/SQLite