Skip to content

Patch next, node-forge, undici, zod and joi audit advisories - #113

Merged
adamXbot merged 2 commits into
mainfrom
fix/audit-next-node-forge-undici-zod-joi
Nov 10, 2026
Merged

adamXbot merged 2 commits into
mainfrom
fix/audit-next-node-forge-undici-zod-joi

Conversation

@adamXbot

@adamXbot adamXbot commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

This raises dependency floors to clear every high/critical pnpm audit --prod --audit-level=high finding. The "dependency audit (prod, high+)" check has failed on every PR since 2026-11-07 (for example #112), on branches that change no dependencies. The task named next and node-forge; by the time of this fix the same check also reports zod, undici 8.x and joi, so all five families are patched here, as the check cannot go green otherwise. The prod audit goes from 15 high/critical findings (2 critical, 13 high) to 0; 5 moderates remain below the gate and stay with Dependabot.

As in #110, every spec keeps its caret and the lockfile is pinned to the patched floor.

Package Change Advisories fixed
next (root dependency) ^16.3.8 → ^16.4.1, locked at 16.4.1. No fix exists on the 16.3.x line; patched versions are >=16.4.1. Critical: unauthenticated RCE in the Image Optimization API with SVG (GHSA-2464-fhr4-w9xw); unauthenticated RCE in use cache functions returning typed arrays (GHSA-673q-mjm6-r5xr). High: DoS in App Router via Server Actions (GHSA-p3m5-59mp-jv5r)
node-forge (new override; via passkit-generator) ^1.4.1, locked at 1.4.1. passkit-generator 3.5.7 still specs ^1.3.2 (lock had 1.4.0), so the floor is forced. High: RSA PKCS#1 v1.5 verification accepts extra nested DigestAlgorithm elements (GHSA-86w9-cpqp-85rv); ReDoS in pem.decode (GHSA-7wch-p9px-956x); PKCS#12 MAC forgery / constant-key PBE via zero iteration count (GHSA-jc66-7q78-782g); TLS record-processing DoS (GHSA-8hrf-8g6f-7xwp, GHSA-hqq3-7jhf-c5jx); X.509 basicConstraints bypass in verifyCertificateChain() (GHSA-5x38-2vff-x55p)
undici (root dependency) ^8.10.2 → ^8.12.2, locked at 8.12.2 High: DoS via unhandled error on excessive content-encodings (GHSA-xjj6-f33q-929c); cache poisoning / cross-user disclosure via cross-origin redirects (GHSA-4w7w-5xrc-9h26); TLS certificate validation bypass via dropped tls options in Agent (GHSA-2m5v-pch6-74hx); DoS via TLS 1.2 certificate-changing renegotiation (GHSA-qrxm-fqhp-jwvm)
zod (root and cli dependency) ^4.4.3 → ^4.6.6, locked at 4.6.6 High: memory exhaustion validating oversized constrained collections (GHSA-mrhx-c7xc-m3w5)
joi (override; via passkit-generator) ^17.13.8 → ^17.13.9, locked at 17.13.9 High: quadratic-time split in string().email({ multiple: true }) (GHSA-4528-x5fx-h6hg)

Notes:

  • Next moves from the 16.3.x line to 16.4.x. That is unavoidable: all three advisories are patched only in >=16.4.1. The lockfile is pinned to 16.4.1 deliberately (a plain pnpm install would resolve ^16.4.1 to 16.4.5). No major version is taken.
  • The lockfile diff is limited to the expected packages: next plus @next/env / @next/swc-*, node-forge, undici 8.x, zod and joi. The undici@7 override for miniflare's 7.x line is untouched; only its comment's reference to the root floor is updated.
  • Reachability for the two overrides is recorded in the comment block in pnpm-workspace.yaml, following the existing convention:
    • node-forge is only used by passkit-generator to read the admin-uploaded Apple signer bundle and the bundled WWDR PEM, and to build the PKCS#7 signature over our own pass manifest. It never sees unauthenticated request input and never runs node-forge's TLS or chain verification.
    • joi only validates the pass.json fields and certificate options we build ourselves.
    • Both are pinned anyway, to clear the audit.
  • No CHANGELOG entry, per the convention for dependency floor bumps.

Test plan

Run locally on this branch:

  • pnpm install: lockfile regenerated; a second install with the caret specs reports "Already up to date"
  • pnpm audit --prod --audit-level=high: exit 0 (5 moderates remain, below the gate)
  • server typecheck (tsc --noEmit) and CLI typecheck: clean
  • server unit tests (vitest run): 56 files, 726 tests passed
  • CLI unit tests (vitest run --root cli): 37 files, 271 tests passed
  • pnpm install --frozen-lockfile in a fresh checkout, then production next build on Next.js 16.4.1: passes with no warnings; .next/standalone ships next@16.4.1
  • integration tests and tier-2 e2e against Postgres: left to CI, which runs both

🤖 Generated with Claude Code

adamXbot and others added 2 commits November 8, 2026 10:00
Raise the floors to clear the high/critical `pnpm audit --prod` findings
that have been failing the "dependency audit (prod, high+)" check on every
PR since 2026-11-07:

- next ^16.3.8 -> ^16.4.1 (locked 16.4.1; no fix on the 16.3.x line):
  unauthenticated RCE in the Image Optimization API with SVG
  (GHSA-2464-fhr4-w9xw, critical), unauthenticated RCE in `use cache`
  functions returning typed arrays (GHSA-673q-mjm6-r5xr, critical) and
  Server Actions DoS in the App Router (GHSA-p3m5-59mp-jv5r, high).
- new node-forge ^1.4.1 override (locked 1.4.1; via passkit-generator,
  which still specs ^1.3.2): RSA PKCS#1 v1.5 verification accepting extra
  nested DigestAlgorithm elements (GHSA-86w9-cpqp-85rv), pem.decode ReDoS
  (GHSA-7wch-p9px-956x), PKCS#12 MAC forgery via zero iteration count
  (GHSA-jc66-7q78-782g), TLS record-processing DoS (GHSA-8hrf-8g6f-7xwp,
  GHSA-hqq3-7jhf-c5jx) and an X.509 basicConstraints bypass
  (GHSA-5x38-2vff-x55p).
- undici ^8.10.2 -> ^8.12.2 (locked 8.12.2): content-encoding DoS
  (GHSA-xjj6-f33q-929c), cross-origin redirect cache poisoning
  (GHSA-4w7w-5xrc-9h26), dropped TLS options in Agent (GHSA-2m5v-pch6-74hx)
  and TLS 1.2 renegotiation DoS (GHSA-qrxm-fqhp-jwvm).
- zod ^4.4.3 -> ^4.6.6 (locked 4.6.6) in the root and the CLI: memory
  exhaustion on oversized constrained collections (GHSA-mrhx-c7xc-m3w5).
- joi override ^17.13.8 -> ^17.13.9 (locked 17.13.9): quadratic-time split
  in string().email({ multiple: true }) (GHSA-4528-x5fx-h6hg).

Reachability for the two overrides is recorded in pnpm-workspace.yaml.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@adamXbot
adamXbot merged commit 47a8155 into main Nov 10, 2026
8 checks passed
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