Prototype Pollution
Description
The @ianwalter/merge npm package is vulnerable to Prototype Pollution through its main merge function, allowing attackers to inject properties into Object.prototype.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The @ianwalter/merge npm package is vulnerable to Prototype Pollution through its main merge function, allowing attackers to inject properties into Object.prototype.
Vulnerability
The @ianwalter/merge npm package (all versions) is vulnerable to Prototype Pollution via its main merge function [1]. The flaw stems from an unsafe recursive merge of source objects into a target object without proper sanitization of special keys like __proto__, constructor, or prototype. When the source object contains a property named __proto__, the merge function recurses onto the prototype of Object itself, polluting the global Object prototype [2].
Exploitation
An attacker can trigger the vulnerability by passing a crafted source object containing a malicious __proto__ property to the merge function. No authentication is required, as any application that merges untrusted user-controlled data using this library is susceptible. The attack surface depends on how the application processes user input; for example, merging JSON payloads from HTTP requests or deserializing data can provide an entry point [1][2].
Impact
Successful exploitation leads to polluting the base Object prototype, causing all JavaScript objects in the runtime to inherit the injected properties. This can result in denial of service (via exceptions) or, more critically, can alter application logic and enable cross-site scripting or remote code execution depending on how the polluted properties are used in the application [2].
Mitigation
No official fix is available for the @ianwalter/merge package. The maintainer recommends migrating to the @generates/merger package as a replacement [1]. Users should audit their dependencies and avoid merging untrusted data with vulnerable implementations.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
@ianwalter/mergenpm | <= 9.0.1 | — |
Affected products
2- @ianwalter/mergedescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-42m6-g935-5vmqghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-23397ghsaADVISORY
- security.snyk.io/vuln/SNYK-JS-IANWALTERMERGE-1311022ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.