VYPR
High severityNVD Advisory· Published Mar 10, 2020· Updated Aug 4, 2024

Prototype pollution in dojo

CVE-2020-5258

Description

Prototype Pollution vulnerability in dojo's deepCopy method allows attackers to inject properties into JavaScript object prototypes, patched in versions 1.12.8+.

AI Insight

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

Prototype Pollution vulnerability in dojo's deepCopy method allows attackers to inject properties into JavaScript object prototypes, patched in versions 1.12.8+.

CVE-2020-5258 is a Prototype Pollution vulnerability in the dojo JavaScript toolkit (NPM package), specifically in the deepCopy method. Prototype Pollution occurs when an attacker can inject properties into existing JavaScript object prototypes, allowing them to overwrite or pollute the base object prototype [1][3]. The root cause is that deepCopy does not sanitize the __proto__ property, enabling the malicious payload to propagate.

To exploit this vulnerability, an attacker supplies a crafted JSON object containing a __proto__ property with a malicious payload. When deepCopy processes this object, it copies the __proto__ property into the prototype chain of the target object, effectively polluting all objects in the application [3]. The attack requires the ability to pass malicious input to the deepCopy method, but no authentication is needed if the input originates from an untrusted source.

Successful exploitation allows the attacker to add arbitrary properties to the global Object.prototype. This can lead to unexpected behavior in the application, such as bypassing security checks, property overwrites, or denial of service, depending on how the polluted properties are used [1]. The impact is broad because the pollution affects all objects that inherit from the polluted prototype.

This vulnerability has been patched in versions 1.12.8, 1.13.7, 1.14.6, 1.15.3, and 1.16.2, as well as in the earlier 1.11.10 release [1][3][4]. Users should upgrade to a patched version immediately. There is no workaround short of patching, as the fix specifically sanitizes the __proto__ property during deep copy operations [4].

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.

PackageAffected versionsPatched versions
dojonpm
< 1.11.101.11.10
dojonpm
>= 1.12.0, < 1.12.81.12.8
dojonpm
>= 1.13.0, < 1.13.71.13.7
dojonpm
>= 1.14.0, < 1.14.61.14.6
dojonpm
>= 1.15.0, < 1.15.31.15.3
dojonpm
>= 1.16.0, < 1.16.21.16.2

Affected products

9

Patches

1
20a00afb68f5

Merge pull request from GHSA-jxfh-8wgv-vfr2

https://github.com/dojo/dojoNick NisiMar 10, 2020via ghsa
2 files changed · +7 1
  • request/util.js+1 1 modified
    @@ -44,7 +44,7 @@ define([
     		for (var name in source) {
     			var tval = target[name],
       			    sval = source[name];
    -			if (tval !== sval) {
    +			if (name !== '__proto__' && tval !== sval) {
     				if (shouldDeepCopy(sval)) {
     					if (Object.prototype.toString.call(sval) === '[object Date]') { // use this date test to handle crossing frame boundaries
     						target[name] = new Date(sval);
    
  • tests/unit/request/util.js+6 0 modified
    @@ -34,6 +34,12 @@ define([
     			assert.equal(object1.banana.purchased.getTime(), new Date(2017, 0, 1).getTime());
     		},
     
    +		'.deepCopy should ignore the __proto__ property': function() {
    +			var payload = JSON.parse('{ "__proto__": { "protoPollution": true }}');
    +			util.deepCopy({}, payload);
    +			assert.isUndefined(({}).protoPollution);
    +		},
    +
     		'deepCopy with FormData': function(){
     			if (has('native-formdata')) {
     				var formData = new FormData();
    

Vulnerability mechanics

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

References

16

News mentions

0

No linked articles in our index yet.