VYPR
High severityNVD Advisory· Published Jun 7, 2018· Updated Sep 16, 2024

CVE-2018-3720

CVE-2018-3720

Description

assign-deep before 0.4.7 allows prototype pollution via __proto__, enabling property addition or modification on all objects.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

assign-deep before 0.4.7 allows prototype pollution via __proto__, enabling property addition or modification on all objects.

Vulnerability

The assign-deep npm package before version 0.4.7 suffers from a prototype pollution vulnerability (MAID). The extend function does not check for the __proto__ key when copying properties from source objects, allowing an attacker to modify Object.prototype via a crafted input object [1][2]. This affects all versions prior to 0.4.7.

Exploitation

An attacker can supply an object containing a __proto__ property with arbitrary nested properties. When assign-deep merges this object into a target, it assigns the nested properties directly onto Object.prototype [2]. No special privileges or authentication are required; the attack is triggered by the library consuming user-controlled objects.

Impact

Successful exploitation allows the attacker to add or modify any property on Object.prototype, thereby affecting all objects in the runtime. This can lead to unexpected behavior, denial of service, property injection, and in some contexts, arbitrary code execution if the application later reads or executes the injected properties [1][2].

Mitigation

The vulnerability is fixed in assign-deep version 0.4.7, released on 2018-07-26 [2]. The fix explicitly excludes the __proto__ key during property assignment [3]. Users should upgrade to version 0.4.7 or later. No known workaround exists for earlier versions.

AI Insight generated on May 22, 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.

PackageAffected versionsPatched versions
assign-deepnpm
< 0.4.70.4.7

Affected products

2
  • ghsa-coords
    Range: < 0.4.7
  • HackerOne/assign-deep node modulev5
    Range: Versions before 0.4.7

Patches

1
19953a8c089b

exclude __proto__

1 file changed · +1 1
  • index.js+1 1 modified
    @@ -37,7 +37,7 @@ function extend(target, obj) {
       assignSymbols(target, obj);
     
       for (var key in obj) {
    -    if (hasOwn(obj, key)) {
    +    if (key !== '__proto__' && hasOwn(obj, key)) {
           var val = obj[key];
           if (isObject(val)) {
             if (typeOf(target[key]) === 'undefined' && typeOf(val) === 'function') {
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.