Skip to content

fix(deps): stop a stack-exhaustion DoS in deepmerge-ts via override - #120

Merged
GeiserX merged 1 commit into
mainfrom
fix/deepmerge-ts-stack-exhaustion
Aug 17, 2026
Merged

fix(deps): stop a stack-exhaustion DoS in deepmerge-ts via override#120
GeiserX merged 1 commit into
mainfrom
fix/deepmerge-ts-stack-exhaustion

Conversation

@GeiserX

@GeiserX GeiserX commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Dependabot alert #93: deepmerge-ts below 8.0.0 blows the stack when it merges recursive object graphs (GHSA-ggr8-5vv4-36mx, high).

It is not a direct dependency. It arrives through prisma -> @prisma/config, which pins it exactly at 7.1.5 — so waiting for Prisma is not an option, and 7.9.1 (current latest) still pins it. A package.json override is the only way to move it.

Fix: override deepmerge-ts to ^8.0.1, which resolves to 8.0.1 in the lockfile (integrity verified against the registry).

Why this is safe to force past an exact pin:

  • @prisma/config uses a single named import, const { deepmerge } = await import("deepmerge-ts"), and v8 still exports deepmerge.
  • v8 keeps dual CJS/ESM exports (require -> dist/index.cjs) and engines: node >= 16, so nothing about the module format changes for its consumer.
  • npx prisma generate — the only thing that loads @prisma/config — runs in all three CI jobs, so a broken override fails this PR rather than the release build.

Blast radius is build-time only. The runtime image is a Next.js standalone bundle; deepmerge-ts and @prisma/config are not present in the running container at all, so production was never exposed and does not need a redeploy for this.

deepmerge-ts < 8.0.0 exhausts the stack when merging recursive object
graphs. It reaches us through @prisma/config, which pins it exactly at
7.1.5, so no Prisma release fixes this - the override is the only route.

v8 keeps the dual CJS/ESM exports and still exports the named deepmerge
that @prisma/config imports, and prisma generate runs in every CI job,
so the swap is exercised before merge.
@GeiserX
GeiserX merged commit e9fcd4c into main Aug 17, 2026
7 of 8 checks passed
@GeiserX
GeiserX deleted the fix/deepmerge-ts-stack-exhaustion branch August 17, 2026 18:18
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