Skip to content

fix(deps): override deepmerge >=4.2.0 <=4.3.1 -> 4.1.2 (Dependabot alert #19) - #449

Merged
avifenesh merged 1 commit into
mainfrom
fix/deepmerge-4.1.2
Nov 6, 2026
Merged

avifenesh merged 1 commit into
mainfrom
fix/deepmerge-4.1.2

Conversation

@avifenesh

Copy link
Copy Markdown
Collaborator

What

Resolves Dependabot alert #19 (GHSA-gcqx-w48m-w2h4 / CVE-2026-93753): deepmerge >=4.2.0, <=4.3.1 — prototype-poisoning guard bypass in mergeObject() (dev scope, pulled only by jest-config).

Why 4.1.2 (downgrade, not upgrade)

The advisory lists no first patched version and upstream has none: 4.3.1 is the latest release, there is no fixed tag on master, and the maintainer has declined to patch (see TehShrike/deepmerge#273). The only available fix is pinning below the vulnerable floor → 4.1.2, scoped to the single vulnerable path via a nested override so no other consumers are affected:

"overrides": { "jest-config": { "deepmerge": "4.1.2" } }

Verification

  • Lockfile regenerates with deepmerge@4.1.2 nested under node_modules/jest-config/node_modules.
  • Full jest suite passes locally: 51 suites / 2184 tests passed against the pinned version.

Notes

…ert #19)

GHSA-gcqx-w48m-w2h4 / CVE-2026-93753 flags deepmerge >=4.2.0,<=4.3.1
(prototype-poisoning guard bypass in mergeObject()). No patched release
exists upstream (first_patched_version: null; 4.3.1 is latest and the
maintainer has declined to patch), so pin to 4.1.2 — the highest version
outside the vulnerable range — scoped to the only dependent path
(jest-config, dev scope). Full jest suite passes locally (2184 passed).
Copilot AI balanced review requested due to automatic review settings November 6, 2026 07:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@revuto-review revuto-review 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.

This is an auto review done by revuto.


Revuto completed the review and found no evidence-backed concerns.

@avifenesh

Copy link
Copy Markdown
Collaborator Author

Independent review (scheduled maintenance)

Verdict: approve-with-nits

Verified independently (Dependabot API, fresh clone of the PR branch, upstream changelog):

  • Advisory facts: alert perf: Freeze static pattern objects for V8 optimization #19 confirmed via the API -- deepmerge, vulnerable range >= 4.2.0, <= 4.3.1, first_patched_version null (maintainer declined to patch, Security Advisory: Prototype-poisoning guard bypass in deepmerge lets a merged object inherit an attacker-controlled prototype TehShrike/deepmerge#273, prototype poisoning in mergeObject()). 4.1.2 < 4.2.0, so the pin lands outside the advisory range. Range math correct.
  • Scope: the override is nested under jest-config ("jest-config": { "deepmerge": "4.1.2" }), and jest-config@30.5.2 is the exact and only deepmerge dependent in the lockfile (requires ^4.3.1). Not a blanket override; no other dependent is dragged down. The final lockfile contains exactly one deepmerge entry, node_modules/jest-config/node_modules/deepmerge @ 4.1.2, and no copy inside >= 4.2.0 <= 4.3.1 anywhere.
  • Exposure: dev-only ("dev": true on the lock entry) -- the vulnerable copy never reached production installs.
  • Syntax: nested npm override path matches the dependent exactly; lockfile v3 regenerated consistently (hoisted 4.3.1 copy removed, nested 4.1.2 copy added).
  • Downgrade safety: deepmerge changelog 4.1.2 -> 4.3.1 contains no API changes (4.2.0 enumerable-overwrite semantics, 4.2.1 falsey-value merge fix, 4.2.2 isMergeableObject call optimization, 4.3.0 propertyIsEnumerable guard, 4.3.1 typedef fix). jest-config only uses deepmerge() for config merging. CI green on this PR (test ubuntu/windows, CodeQL).
  • Diff touches only package.json and package-lock.json. No unrelated files.

Nits (non-blocking):

  • 4.1.2 does not satisfy jest-config's declared deepmerge ^4.3.1; overrides intentionally violate the spec, which works, but any future jest-config bump should re-check this pin, and it should be dropped in favor of a genuinely patched release (> 4.3.1) if one ever ships.
  • The pin silently skips 4.2.1's "falsey values can now be merged" fix -- irrelevant to jest config merging today, just worth knowing.

@avifenesh
avifenesh merged commit d2a5056 into main Nov 6, 2026
9 checks passed
@avifenesh
avifenesh deleted the fix/deepmerge-4.1.2 branch November 6, 2026 08:46
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.

2 participants