Skip to content

fix(deps): update dependency deepmerge-ts to v8 [security] - #56

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-deepmerge-ts-vulnerability
Open

fix(deps): update dependency deepmerge-ts to v8 [security]#56
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-deepmerge-ts-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
deepmerge-ts ^4.2.2 โ†’ ^8.0.0 age confidence

DeepmergeTS has stack exhaustion when merging recursive object graphs

CVE-2026-40345 / GHSA-ggr8-5vv4-36mx

More information

Details

Summary

deepmerge() and deepmergeInto() can be crashed with a crafted recursive object graph. When both merged values contain self-references at the same property path, the library recurses until Node throws RangeError: Maximum call stack size exceeded.

Details

Record merging is implemented recursively. For each enumerable key, the library collects the values from every input object and immediately calls the same merge routine on that property.

There is no visited-object tracking, pair tracking, or cycle detection in that recursion. As a result, if two merged records both point back to themselves through the same key path, the merge logic keeps revisiting the same object pair forever.

This is reachable through the real public API:

  • deepmerge(...)
  • deepmergeCustom(...)(...)
  • deepmergeInto(target, ...)
  • deepmergeIntoCustom(...)(target, ...)

The issue only occurs when recursive object graphs are supplied. Plain JSON alone does not create this condition.

PoC
import { deepmerge, deepmergeInto } from "deepmerge-ts";

const left = {};
left.self = left;

const right = {};
right.self = right;

try {
  deepmerge(left, right);
} catch (error) {
  console.log(error.name, error.message);
  // Expected: the merge should reject or safely handle recursive input without exhausting the stack.
  // Vulnerable behavior: RangeError Maximum call stack size exceeded
}

const target = {};
target.self = target;

const source = {};
source.self = source;

try {
  deepmergeInto(target, source);
} catch (error) {
  console.log(error.name, error.message);
  // Expected: the merge should reject or safely handle recursive input without exhausting the stack.
  // Vulnerable behavior: RangeError Maximum call stack size exceeded
}
Impact

Applications that pass attacker-controlled recursive object graphs into these APIs can be forced into a synchronous crash path. In Node.js services, that can terminate request handling for the affected process or trigger repeated worker restarts until the malicious input is blocked.

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

RebeccaStevens/deepmerge-ts (deepmerge-ts)

v8.0.0

Compare Source

Bug Fixes
  • stop deepmergeInto from leak-mutating nested input containers (2cd7824)
Code Refactoring
  • rename mergeInfo system and align shorthand, add JSDoc examples (590ed9b)
Features
Performance Improvements
BREAKING CHANGES
  • deepmergeInto no longer leak-mutates input containers.
    Code that depended on inputs being merged into the target through alias
    must now pass copies explicitly. The documented 'update the target'
    behavior is preserved on the target itself.
    • DeepMergeMetaMetaData has been renamed to DeepMergeMergeInfo. Imports
      must be updated.
  • The MetaDataUpdater callback's metaMeta parameter is now mergeInfo.
    Implementations must update the parameter name accordingly.
  • The MM generic shorthand has been renamed to MI (e.g. in
    MetaDataUpdater<M, MI>).
  • The DeepMergeIntoFunctionUtils type has been renamed to DeepMergeIntoUtils.
  • Updates the internal calculation logic for mergeMaps and
    mergeMapsInto. Colliding keys will now be merged.

7.1.6 (2026-08-11)

Bug Fixes

7.1.5 (2025-02-23)

Bug Fixes

7.1.4 (2025-01-23)

Bug Fixes

7.1.3 (2024-10-08)

7.1.2 (2024-10-08)

Performance Improvements

7.1.1 (2024-10-04)

Performance Improvements
  • add explicit return type to speed up types (8e1ff6d)

v7.1.6

Compare Source

Bug Fixes
  • stop deepmergeInto from leak-mutating nested input containers (2cd7824)
Code Refactoring
  • rename mergeInfo system and align shorthand, add JSDoc examples (590ed9b)
Features
Performance Improvements
BREAKING CHANGES
  • deepmergeInto no longer leak-mutates input containers.
    Code that depended on inputs being merged into the target through alias
    must now pass copies explicitly. The documented 'update the target'
    behavior is preserved on the target itself.
    • DeepMergeMetaMetaData has been renamed to DeepMergeMergeInfo. Imports
      must be updated.
  • The MetaDataUpdater callback's metaMeta parameter is now mergeInfo.
    Implementations must update the parameter name accordingly.
  • The MM generic shorthand has been renamed to MI (e.g. in
    MetaDataUpdater<M, MI>).
  • The DeepMergeIntoFunctionUtils type has been renamed to DeepMergeIntoUtils.
  • Updates the internal calculation logic for mergeMaps and
    mergeMapsInto. Colliding keys will now be merged.

7.1.6 (2026-08-11)

Bug Fixes

7.1.5 (2025-02-23)

Bug Fixes

7.1.4 (2025-01-23)

Bug Fixes

7.1.3 (2024-10-08)

7.1.2 (2024-10-08)

Performance Improvements

7.1.1 (2024-10-04)

Performance Improvements
  • add explicit return type to speed up types (8e1ff6d)

v7.1.5

Compare Source

Bug Fixes

v7.1.4

Compare Source

Bug Fixes

v7.1.3

Compare Source

v7.1.2

Compare Source

Performance Improvements

v7.1.1

Compare Source

Performance Improvements
  • add explicit return type to speed up types (8e1ff6d)

v7.1.0

Compare Source

Features

7.0.3 (2024-06-06)

Bug Fixes

7.0.2 (2024-06-03)

Bug Fixes

7.0.1 (2024-05-21)

Bug Fixes

v7.0.3

Compare Source

Features

7.0.3 (2024-06-06)

Bug Fixes

7.0.2 (2024-06-03)

Bug Fixes

7.0.1 (2024-05-21)

Bug Fixes

v7.0.2

Compare Source

Features

7.0.3 (2024-06-06)

Bug Fixes

7.0.2 (2024-06-03)

Bug Fixes

7.0.1 (2024-05-21)

Bug Fixes

v7.0.1

Compare Source

Features

7.0.3 (2024-06-06)

Bug Fixes

7.0.2 (2024-06-03)

Bug Fixes

7.0.1 (2024-05-21)

Bug Fixes

v7.0.0

Compare Source

Features

7.0.3 (2024-06-06)

Bug Fixes

7.0.2 (2024-06-03)

Bug Fixes

7.0.1 (2024-05-21)

Bug Fixes

v6.0.3

Compare Source

Code Refactoring
  • rename DeepMergeFunctionUtils to DeepMergeUtils (e821255)
  • rename DeepMergeMerge* to DeepMerge* (fd4d2d4)
Features
BREAKING CHANGES
  • rename DeepMergeFunctionUtils to DeepMergeUtils
  • rename DeepMergeMerge* to DeepMerge*
  • allow filtering out values before merging them

6.0.3 (2024-05-20)

Bug Fixes
  • deepmergeInto unsafe key value assignment (6b04863)

6.0.2 (2024-05-20)

Bug Fixes

6.0.1 (2024-05-20)

Bug Fixes

v6.0.2

Compare Source

Code Refactoring
  • rename DeepMergeFunctionUtils to DeepMergeUtils (e821255)
  • rename DeepMergeMerge* to DeepMerge* (fd4d2d4)
Features
BREAKING CHANGES
  • rename DeepMergeFunctionUtils to DeepMergeUtils
  • rename DeepMergeMerge* to DeepMerge*
  • allow filtering out values before merging them

6.0.3 (2024-05-20)

Bug Fixes
  • deepmergeInto unsafe key value assignment (6b04863)

6.0.2 (2024-05-20)

Bug Fixes

6.0.1 (2024-05-20)

Bug Fixes

v6.0.1

Compare Source

Code Refactoring
  • rename DeepMergeFunctionUtils to DeepMergeUtils (e821255)
  • rename DeepMergeMerge* to DeepMerge* (fd4d2d4)
Features
BREAKING CHANGES
  • rename DeepMergeFunctionUtils to DeepMergeUtils
  • rename DeepMergeMerge* to DeepMerge*
  • allow filtering out values before merging them

6.0.3 (2024-05-20)

Bug Fixes
  • deepmergeInto unsafe key value assignment (6b04863)

6.0.2 (2024-05-20)

Bug Fixes

6.0.1 (2024-05-20)

Bug Fixes

v6.0.0

Compare Source

Code Refactoring
  • rename DeepMergeFunctionUtils to DeepMergeUtils (e821255)
  • rename DeepMergeMerge* to DeepMerge* (fd4d2d4)
Features
BREAKING CHANGES
  • rename DeepMergeFunctionUtils to DeepMergeUtils
  • rename DeepMergeMerge* to DeepMerge*
  • allow filtering out values before merging them

6.0.3 (2024-05-20)

Bug Fixes
  • deepmergeInto unsafe key value assignment (6b04863)

6.0.2 (2024-05-20)

Bug Fixes

6.0.1 (2024-05-20)

Bug Fixes

v5.1.0

Compare Source

Features
  • expose some of the internal utils (a11a03d)

v5.0.0

Compare Source

Bug Fixes
chore
  • drop support for node 12 and 14 (77016f7)
BREAKING CHANGES
  • drop support for node 12 and 14

v4.3.0

Compare Source

Features

4.2.2 (2022-09-19)

4.2.1 (2022-06-15)

Bug Fixes

Configuration

๐Ÿ“… Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

๐Ÿšฆ Automerge: Disabled by config. Please merge this manually once you are satisfied.

โ™ป Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

๐Ÿ”• Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

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.

0 participants