Skip to content

fix(deps): update dependency zod to v4.6.6 [security] - #486

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-zod-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-zod-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
zod (source) 4.6.5 → 4.6.6 age confidence

Zod can exhaust memory while validating oversized constrained collections

CVE-2023-54404 / GHSA-mrhx-c7xc-m3w5

More information

Details

Zod schema-validation library through 4.6.5 contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust memory by submitting a large array to an application using an array schema without a length constraint. Attackers can exploit the handleArrayResult parse logic in $ZodArray, which accumulates every validation issue for each failing element with no cap or early termination, causing the process to allocate excessive issue objects and crash due to out-of-memory conditions.

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

colinhacks/zod (zod)

v4.6.6

Compare Source

Six malicious commits pushed to main on September 21 with a compromised git credential were reverted the same day in #​6620 and have since been removed from the history of main. None were ever published to npm. The npm provenance for 4.6.6 names 284243f, the pre-rewrite copy of 9c21983 with identical contents.

Commits:

  • 0cd3af5 docs: load the en locale directly in Zod Mini
  • 9d5e60f docs: import locales from zod/locales, not z.locales
  • 34a626f docs: tighten the z.locales tree-shaking note
  • 74304ce release: stage npm versions instead of publishing them (#​6622)
  • b2ef983 docs: add Code for Japan to bronze sponsors
  • 8fb2faf docs: crop the Code for Japan logo and list it first in bronze
  • bacad51 docs: square the Code for Japan logo to match the other bronze tiles
  • c42596b release: hold the run on the release-approval environment until the staged versions are approved (#​6638)
  • a2ba4a6 fix(types): declare record output and input as members, not base type arguments (#​6645)
  • a0ebf97 fix(v4): check array, set and map size bounds before parsing elements (#​6652)
  • 529f78d 4.6.6
  • 9c21983 ci: stage at verbose so a failed OIDC token exchange says why

Configuration

📅 Schedule: (in timezone America/New_York)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • "after 10am and before 4pm every weekday"

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from nsheaps as a code owner October 23, 2026 21:36
@renovate
renovate Bot enabled auto-merge (squash) October 23, 2026 21:36
@github-actions

Copy link
Copy Markdown
Contributor

Release Version Check

🟢 PATCH version bump

Version
Current 0.64.13
Next 0.64.14

This version will be released automatically when this PR is merged to main.

Changelog preview

0.64.14 (2026-10-23)

Bug Fixes

  • deps: update dependency zod to v4.6.6 [security] (8676e64)

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

The web app for this PR has been deployed:

Open Preview

Use this to verify the app works correctly, especially for dependency updates.

github-actions Bot added a commit that referenced this pull request Oct 23, 2026

@henry-nsheaps henry-nsheaps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approve — security patch bump looks clean

  • ✅ Renovate patch bump zod 4.6.5 → 4.6.6 to pick up the fix for CVE-2023-54404 (array/set/map size bounds now checked before parsing elements — colinhacks/zod#6652).
  • ✅ Diff is version-string only: packages/core/package.json + matching bun.lock entry (version + sha512). No code changes needed; patch within the 4.6.x line.
  • ✅ Supply-chain note from upstream release — the six malicious commits pushed to zod main on Sep 21 were reverted the same day and never published to npm. npm provenance for 4.6.6 names 284243f (identical to the pre-rewrite 9c21983). Safe to adopt.
  • ✅ Repo exposure to CVE is low in practice: the only z.array(...) call lives in packages/core/src/space/config.ts and parses local YAML config files, not a network boundary — but patching is still the right call.

Click to expand for full details

Scope of change

packages/core/package.json |  2 +-
bun.lock                   |  4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

Both edits are version-string bumps against the same zod dependency; the lockfile hash update (sha512-v5l… → sha512-4Um…) matches the npm registry entry for 4.6.6.

CVE analysis in context

  • Advisory: GHSA-mrhx-c7xc-m3w5, CVSS 4.0 base 8.2 (High). Attack vector is a schema-validated input containing a very large array; pre-patch $ZodArray.handleArrayResult enumerated issues for every failing element with no early termination, enabling memory exhaustion.
  • Fix: Size bounds (.min/.max) are now evaluated before per-element parsing, so an unbounded array validation can short-circuit rather than allocate an issue per element.
  • Repo usage: The sole zod array call site is packages/core/src/space/config.ts — z.array(z.string(), { error: 'must be a list of strings' }).optional(). The input is a YAML config file from the user's workspace, so a successful exploit would require the attacker to already control the local filesystem; impact is bounded. The upgrade is still worthwhile for hygiene and future call sites.
  • Possible follow-up (P2): once this lands, consider adding .max(…) bounds to any array schemas that parse untrusted or externally-sourced data. Not required for this PR.

Non-code checks

  • bun.lock entry structure is unchanged (same keys, same transitive deps block); only the version and integrity hash moved, which is the expected shape for a patch bump of a leaf dependency.
  • package.json keeps the exact-version pin style used elsewhere in the file — no range operator introduced.
  • Renovate description accurately summarizes the CVE and release notes; the auto-generated changelog preview and release-version-check comment are consistent (0.64.13 → 0.64.14, fix(deps) conventional-commit prefix).

Risk assessment

Dimension Notes
Correctness ✅ Semver patch; no breaking changes expected.
Security ✅ Addresses the advertised CVE; supply-chain provenance addressed in upstream notes.
Performance ✅ Fix actually improves worst-case behavior under hostile input.
Maintainability ✅ Pure dependency update; no code touched.
Test coverage ✅ N/A — no production logic changed. CI will cover regression via existing suites.
PR description accuracy ✅ Matches the diff.

Follow-ups: none.


This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants