Headline
CVE-2020-5258: Merge pull request from GHSA-jxfh-8wgv-vfr2 · dojo/dojo@20a00af
In affected versions of dojo (NPM package), the deepCopy method is vulnerable to Prototype Pollution. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. This has been patched in versions 1.12.8, 1.13.7, 1.14.6, 1.15.3 and 1.16.2
@@ -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();