Skip to content

Update zod to 4.6.7 for a memory-exhaustion advisory - #215

Closed
arun279 wants to merge 1 commit into
feat/expo-nativefrom
fix/zod-advisory
Closed

arun279 wants to merge 1 commit into
feat/expo-nativefrom
fix/zod-advisory

Conversation

@arun279

@arun279 arun279 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Fixes the high-severity advisory GHSA-mrhx-c7xc-m3w5 (CVE-2023-54404): zod before 4.6.6 collects every issue when an array schema without a length cap fails, so a large array can exhaust memory. Cue's core validates Trakt responses with zod.

  • packages/core now asks for ^4.6.6, and a pnpm override (zod@<4.6.6 to ^4.6.6) moves every other copy too. The only other production copy is Expo CLI's zod 3, which uses basic builders (string, object, enum, array, literal, union, boolean, number) in its dev-tools plugin schema; those behave the same in zod 4. The lockfile now holds a single zod, 4.6.7.
  • The braces audit ignore (GHSA-vfj7-8cjw-p6xm) no longer matches an installed version and is removed.

pnpm audit --prod --audit-level=high passes and check-stale-audit-ignores is clean. pnpm check passes, including the Expo export used for the bundle checks.

Zod before 4.6.6 can exhaust memory validating a large array against an
uncapped array schema; Cue's core parses Trakt responses with it. A pnpm
override moves every copy to 4.6.6 or later, including Expo CLI's zod 3, which
only uses basic schema builders (string, object, enum, array, literal, union)
in its dev-tools plugin. The braces audit ignore no longer applies and is
removed.
@github-actions

Copy link
Copy Markdown

Pull request footprint

measurement base to head
Product code lines in core/src, native/src, native/app, and native/modules +0
Test lines in test, packages/*/{test,__tests__,e2e}, and .maestro +0
CI and tooling lines in .github and scripts +0
Product comment lines identified by a comment prefix +0

User-delivered artifact sizes

measurement base head delta
Expo iOS JavaScript bundle, raw file 5.46 MB 5.63 MB +173.7 kB
Expo Android JavaScript bundle, raw file 5.50 MB 5.67 MB +174.1 kB
Firebase tester APK, arm64-v8a and all densities 41.18 MB 41.32 MB +143.4 kB
Play download estimate, XXXHDPI arm64-v8a English Android 15 19.84 MB 19.90 MB +62.4 kB

Most complex product function

measurement base head
Cyclomatic complexity, oxlint complexity 10 10
Cognitive complexity, Biome noExcessiveCognitiveComplexity 15 15

@arun279

arun279 commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Folded into #212 as its own commit, so the fix runs on the new CI pipeline; #212 touches the lockfile and is gated on the same audit.

@arun279 arun279 closed this Oct 24, 2026
@arun279
arun279 deleted the fix/zod-advisory branch October 24, 2026 03:42
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.

1 participant