Same results. No CVE.
@stackline/deepmerge
A drop-in replacement for deepmerge 4. Swap one dependency, keep every result, and lose CVE-2026-93753 and circular-reference crashes. Hardening, Map and Set merging, and array strategies are one option away.
npm install deepmerge@npm:@stackline/deepmerge
v1.1.2 Node 14.17+ TypeScript 3.9-7.0 0 dependencies
Runs the production bundle
Merge playground
Target
JSONSource
JSONResult
Lowest-change adoption
Keep existing imports
Install through an npm alias and code that imports
deepmerge keeps working, with the same results.
npm uninstall deepmerge
npm install deepmerge@npm:@stackline/deepmerge
import merge from 'deepmerge';
const config = merge(defaults, environment);
deepmerge 4.3.1 is the latest upstream release
What the swap fixes
| Input | deepmerge 4.3.1 | @stackline/deepmerge |
|---|---|---|
__proto__ merged into a null-prototype object or a null placeholder | The result inherits attacker data (CVE-2026-93753) | Key dropped at every depth |
| Circular references | Stack overflow | Cycle reproduced in the result |
| Frozen options object | TypeError | Merges normally |
| React 19 elements | Props of two elements merged together | Kept intact |
| Everything else | Identical results: values, key order, prototypes, and copies | |
Public contract
deepmerge 4 API, plus opt-in tools
| Export or option | Purpose | Default |
|---|---|---|
merge(target, source, options?) | Immutable recursive merge | deepmerge 4 results |
merge.all(objects, options?) | Merge a list from left to right | deepmerge 4 results |
strict(target, source, options?) | Strict keys, throw on rejection, depth and key limits | Separate export |
createDeepmerge(defaults) | Reusable merge with preset options | Separate export |
overwriteArrays, mergeArraysByIndex, mergeArraysByKey(key), concatUniqueArrays | Ready-made arrayMerge strategies | Concatenate |
isPlainMergeableObject | Keep class instances and built-ins intact | Traverse every object |
mergeCollections | Merge Map entries and union Set values | false |
skipUndefined | undefined does not replace target values | false |
customMergeScope: 'all' | customMerge also handles primitive values | 'objects' |
unsafeKeys, onUnsafeKey, maxDepth, maxKeys | Hardening for untrusted input | Drop __proto__, no limits |
UnsafeKeyError, DeepMergeLimitError | Structured rejection errors | Named and static export |
Release evidence
Compatibility is tested, not implied
Every upstream issue, pull request, and fork is tracked in the upstream review.
- 900,000
- full-graph comparisons against deepmerge 4.3.1 without a difference
- 115
- assertions from deepmerge's own test suite, passing
- 3.9-7.0
- TypeScript compatibility matrix
- 0
- runtime dependencies