zod
4.6.7 · 12 Oct 2026MIT468.6M / weekRepositoryHomepagenpmAtom feed
4.6.7 is the newest release of 4.x.
Summary· from the note as AI read it
Migration neededRead before upgrading: 1 change to make.
Before you upgrade
- The root 'zod' import now gives Zod 4; migrate v3 code or use zod/v3.
New
- If you’ve already migrated to Zod 4 using the subpaths, there are no changes required. however you can optionally simplify your imports (recommended)
In short
1 breaking1 new
- Breaking
With this release,
zod@4.0.0has been published tonpm. There were no code changes between 3.25.76 and 4.0.0!
Security
1 advisory affects 4.0.1; 4.6.6 fixes them
- HighZod can exhaust memory while validating oversized constrained collectionsGHSA-mrhx-c7xc-m3w5 · 1 Oct 2026Fixed in 4.6.6
Release note
With this release, zod@4.0.0 has been published to npm. There were no code changes between 3.25.76 and 4.0.0!
Zod 4 has been stable for the past 6 weeks, but it was published inside zod@3.25.x on npm. this transitionary window gave the ecosystem time to incrementally support for Zod 4 (without dropping support for Zod 3). As there is now near-universal support for Zod 4 in the ecosystem, ths time feels right to finally put a bow on things 🎀
To upgrade to Zod 4:
npm upgrade zod@^4.0.0
If you’ve already migrated to Zod 4 using the subpaths, there are no changes required. however you can optionally simplify your imports (recommended)
// after upgrading to zod@4.0.0: import * as z from "zod"; // Zod 4 (regular) import * as z from "zod/mini" // Zod 4 Mini // these still work, but are no longer needed import * as z from "zod/v4"; import * as z from "zod/v4-mini": // if you still need Zod 3 import * as z from "zod/v3"; // Zod 3
Library authors — if you've already implemented Zod 4 support according to the best practices outlined in the Library authors guide, bump your peer dependency to include zod@^4.0.0:
// package.json
{
"peerDependencies": {
"zod": "^3.25.0 || ^4.0.0"
}
}There should be no other code changes necessary. No code changes were made between the latest 3.25.x release and 4.0.0. This does not require a major version bump.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.