fix: override deepmerge-ts to 8.0.0 to resolve GHSA-ggr8-5vv4-36mx (DEVX-8520) - #34
Draft
warp-agent-staging[bot] wants to merge 1 commit into
Draft
Conversation
…EVX-8520) Co-Authored-By: Warp <agent@warp.dev>
Author
|
This PR was generated with Warp. Comment |
Author
There was a problem hiding this comment.
Overview
Forces deepmerge-ts to 8.0.0 through an npm overrides entry to clear GHSA-ggr8-5vv4-36mx, which is only reachable here transitively via @prisma/config. The remediation is correct and minimal; one judgment call is left to a human before merge.
Concerns
- The override forces a major version (
7.1.5->8.0.0) onto@prisma/config@7.9.1, which pinsdeepmerge-tsat the exact version7.1.5, so this configuration is not one Prisma supports or tests.@prisma/configdynamically importsdeepmerge-tsand handsdeepmergetoc12withextend,rcFile,packageJsonandgigetall disabled, and this repo's Prisma config contains only plain records, strings and arrays — so 8.0.0's two behavioural breaks (Map values now deep-merged by default,deepmergeIntono longer mutating inputs) are not exercised today. Accept the residual risk knowingly, and re-check this override if Prisma config ever gains Map-valued options or@prisma/configchanges how it uses the merger. package-lock.jsonwas not left exactly as stock npm emitted it: npm 11.3.0 in the authoring environment strips"peer": truefrom 22 unrelated entries even with an unmodifiedpackage.json, so that churn was reverted and only thedeepmerge-tsentry was applied. Reproduced independently, and the retained entry'sversion/resolved/integritymatch the publisheddeepmerge-ts@8.0.0tarball (SHA-512 recomputed fromnpm pack), withnpm cisucceeding from clean — so the lockfile is internally consistent, but a contributor on a different npm version will see that peer-flag churn reappear on their nextnpm install.
Verdict
Checks: build pass, tests n/a (no suite exercised; dependency-only change), CI green (CodeQL), visual proof n/a
Found: 0 critical, 0 important, 0 suggestions, 0 nits, 2 questions for a human
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Overrides the transitive
deepmerge-tsdependency from7.1.5to8.0.0to resolve GHSA-ggr8-5vv4-36mx / CVE-2026-40345 (DEVX-8520), a high-severity (CVSS v4 8.2) uncontrolled-recursion (CWE-674) DoS:deepmerge()/deepmergeInto()recurse without cycle detection, so merging two objects that both self-reference at the same key path crashes the process withRangeError: Maximum call stack size exceeded.deepmerge-tsis not a direct dependency here — it's pulled in transitively by@prisma/config@7.9.1(a dependency of the directprismapackage), which pins it at the exact version7.1.5.@prisma/config@latestis still7.9.1and still pins7.1.5, so there is no upstream bump to wait for. The vulnerable range is< 8.0.0with8.0.0as the first patched version and no 7.x backport, so an npmoverridespin to8.0.0— matching the existing style of this repo'soverridesblock — is the correct, minimal lever.8.0.0is a major version bump. It keeps the same dual CJS/ESMexportsand the sameengines.node >=16.0.0as7.1.5. Its documented breaking changes (Map values deep-merged by default, a couple of renamed/deprecated TypeScript types, anddeepmergeIntono longer leak-mutating inputs) do not affect this repo's usage, sincedeepmerge-tsis only reached indirectly through@prisma/config's internal config-merging logic, not called directly from this codebase.Changes
package.json: add"deepmerge-ts": "8.0.0"to theoverridesblock (exact pin, matching the style of the other entries).package-lock.json: updated the singlenode_modules/deepmerge-tsentry (version,resolved,integrity,funding) to8.0.0using npm's own computed values.deepmerge-tsremains transitive/override-only — it was not added todependenciesordevDependencies, and no other package was touched.Note: a plain
npm install/npm install --package-lock-onlyin this environment also strips the"peer": trueflag from ~20 unrelated lockfile entries, even on an unmodifiedpackage.json— this reproduces even without this change, so it's an artifact of the local npm version (11.3.0) rather than something caused by this fix. That unrelated churn was reverted; only thedeepmerge-tsentry was updated, using the version/resolved/integrity/funding fields npm itself computed for8.0.0.Verification
git diff— confirmed the diff touches only thedeepmerge-tsoverride line inpackage.jsonand the singledeepmerge-tsentry inpackage-lock.json.npm ci— succeeds cleanly with the regenerated lockfile.npm ls deepmerge-ts— resolves todeepmerge-ts@8.0.0 overridden(previously7.1.5), with no residual7.1.5anywhere in the tree.npm audit— the deepmerge-ts/GHSA-ggr8-5vv4-36mx finding is gone. Three unrelated pre-existing advisories remain (@hono/node-serverpath traversal,fast-urihost confusion,nanoidinfinite loop viapostcss) — out of scope for this change.deepmerge()) against the installeddeepmerge-ts@8.0.0: it no longer throwsRangeError: Maximum call stack size exceeded; it returns a merged object preserving the self-reference.npx prisma generate— succeeds ("Loaded Prisma config from prisma.config.ts" confirms@prisma/config, the actual consumer ofdeepmerge-ts, exercised the override successfully).npx prisma validate— succeeds ("The schema at prisma/schema.prisma is valid").npm run lint— passes (0 errors; 6 pre-existing warnings unrelated to this change).npm run build(prisma generate && next build) — production build succeeds.Co-Authored-By: Warp agent@warp.dev