Repository navigation
fix(deps): lift the zod copy of @strapi/utils to 4.6.7 (GHSA-mrhx-c7xc-m3w5) - #15
Merged
Merged
Conversation
…c-m3w5) zod < 4.6.6 collects one issue per failing array element without a cap, so a large array can exhaust memory (GHSA-mrhx-c7xc-m3w5, high). The plugin's own validation already used zod ^4.6.7; the vulnerable copy was zod 4.4.3, pinned exactly by @strapi/utils 5.63.0, which is a runtime dependency of the plugin. - package.json: overrides { "zod@4.4.3": "^4.6.7" }, the same targeted override strapi-auto-uuid and Magic Link use. Lockfile: the nine nested @strapi/*/node_modules/zod 4.4.3 entries are gone, all zod 4 dedupes to 4.6.7. zod 3.25.76 (koa-body, koa-session under the @strapi/strapi devDependency) stays: dev-only, no patched 3.x exists. - tests/package.test.cjs DEP-02 fails when a zod 4 below 4.6.6 returns. - CHANGELOG [Unreleased] Security: what changed and how a host app can apply the same override (npm ignores overrides of dependencies). Docs read: advisory GHSA-mrhx-c7xc-m3w5 (GitHub advisory API), zod release notes v4.4.3..v4.6.7 (github.com/colinhacks/zod/releases; 4.5.0 stricter string formats, 4.6.0 frozen CJS exports, 4.6.6 array/set/map size bounds checked before parsing), npm overrides (docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides). Verified with npm 10.9.8 and npm 11.21.2 (npm ci), Node 22.23: lint, format:check, test (122/122), test:admin, test:ts:front, test:ts:back, build, verify, verify:runtime; npm audit --omit=dev: 0 vulnerabilities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 19, 2026
## [4.0.5](v4.0.4...v4.0.5) (2026-11-19) ### Bug Fixes * **deps:** lift the zod copy of @strapi/utils to 4.6.7 (GHSA-mrhx-c7xc-m3w5) ([#15](#15)) ([3014725](3014725)) ### Security * zod [GHSA-mrhx-c7xc-m3w5](GHSA-mrhx-c7xc-m3w5) (a large array can exhaust memory during validation; fixed in zod 4.6.6). The plugin's own request validation already runs on zod ^4.6.7, and every array it parses has an upper bound. `@strapi/utils` 5.63.0, a runtime dependency of the plugin, pins zod 4.4.3: the plugin's lockfile now overrides that copy to ^4.6.7, and a regression test fails when any zod 4 below 4.6.6 comes back into the lockfile. * npm reads `overrides` only in the root project, so a Strapi 5.63 app still installs zod 4.4.3 for its own `@strapi/*` packages until Strapi raises that pin. To patch the app now, add `"overrides": { "zod@4.4.3": "^4.6.7" }` to the app's `package.json`, reinstall and run your tests: zod 4.5 made some string formats stricter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes Dependabot alert #3 (high): zod GHSA-mrhx-c7xc-m3w5, a large array can exhaust memory during validation (
< 4.6.6, patched in 4.6.6).Path
dependencies.zod ^4.6.7) was already 4.6.7, and every array schema inserver/src/validation.tshas a.max().@strapi/utils5.63.0, which is a runtime dependency of the plugin (npm explain:@strapi/utils@5.63.0 → zod@4.4.3, plus the dev-only@strapi/*packages under@strapi/strapi).@strapi/utils@latest(5.63.0) still pins 4.4.3, so a range bump cannot fix it.Change
package.json:"overrides": { "zod@4.4.3": "^4.6.7" }, the same targeted override used by strapi-auto-uuid and Magic Link. Within zod 4, but it replaces an exact pin, so the full suite was run against it.package-lock.json: the nine nested@strapi/*/node_modules/zod4.4.3 entries are removed; every zod 4 dedupes to 4.6.7. No other lockfile drift. zod 3.25.76 (koa-body and koa-session under the@strapi/strapidevDependency) remains: dev-only, and no patched 3.x exists.tests/package.test.cjsDEP-02: it was written first and failed before the fix. It fails if any zod 4 below 4.6.6 comes back into the lockfile, or if a zod 3 copy becomes a runtime dependency.CHANGELOG.md[Unreleased]/ Security: the fix, plus a note for host apps. npm readsoverridesonly in the root project, so a Strapi 5.63 app keeps zod 4.4.3 for its own@strapi/*packages until Strapi raises the pin. Apps can add the same override themselves and test it (zod 4.5 made some string formats stricter).Release
fix(deps):makes semantic-release publish a patch (4.0.5) when this is squash-merged with this title. For consumers, the effect is the changelog guidance and a patched lockfile. Their own install still resolves zod through their Strapi app.Docs read
overrides(docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides)Verification (local, Node 22.23)
npm ci --legacy-peer-depswith npm 10.9.8 and with npm 11.21.2: clean, and the lockfile is unchanged afterwardslint,format:check,test(122/122),test:admin,test:ts:front,test:ts:back,build,verify,verify:runtime: all exit 0npm audit --omit=dev: 0 vulnerabilitiesNot in this PR (dev-only alerts, dismissed separately)
minimatch GHSA-g3hv-75wg-m249, @hono/node-server GHSA-rmxm-3fg6-px4f and react-router GHSA-wrjc-x8rr-h8h6 / GHSA-337j-9hxr-rhxg have no fix that the declaring packages allow. Their reasons are on the alerts.
🤖 Generated with Claude Code