configuration-handler@4.3.1

Vulnerabilities

4 via 4 paths

Dependencies

256

Source

npm

Find, fix and prevent vulnerabilities in your code.

Severity
  • 2
  • 2
Status
  • 4
  • 0
  • 0

high severity

Arbitrary Code Execution

  • Vulnerable module: static-eval
  • Introduced through: jsonpath@0.2.12

Detailed paths

  • Introduced through: configuration-handler@4.3.1 jsonpath@0.2.12 static-eval@0.2.3
    Remediation: Upgrade to jsonpath@1.0.1.

Overview

static-eval evaluates statically-analyzable expressions.

Affected versions of this package are vulnerable to Arbitrary Code Execution. It passes untrusted user input directly to the global function constructor, resulting in an arbitrary code execution vulnerability when user input is parsed via the package.

Proof of concept

var evaluate = require('static-eval');
var parse = require('esprima').parse;

var src = process.argv[2];
var payload = '(function({x}){return x.constructor})({x:"".sub})("console.log(process.env)")()'
var ast = parse(payload).body[0].expression;
console.log(evaluate(ast, {x:1}));

Remediation

Upgrade static-eval to version 2.0.2 or higher.

References

high severity

Arbitrary Code Execution

  • Vulnerable module: static-eval
  • Introduced through: jsonpath@0.2.12

Detailed paths

  • Introduced through: configuration-handler@4.3.1 jsonpath@0.2.12 static-eval@0.2.3
    Remediation: Upgrade to jsonpath@1.0.0.

Overview

static-eval is a module to evaluate statically-analyzable expressions.

Affected versions of the package are vulnerable to Arbitrary Code Execution. If un-sanitized user input is passed to static-eval, it is possible to break out of the sandboxed instance, and execute arbitrary code from the standard library.

Remediation

Upgrade static-eval to version 2.0.0 or higher.

References

medium severity

Command Injection

  • Vulnerable module: jison
  • Introduced through: jsonpath@0.2.12

Detailed paths

  • Introduced through: configuration-handler@4.3.1 jsonpath@0.2.12 jison@0.4.13

Overview

jison is a package that provides an API for creating parsers in JavaScript.

Affected versions of this package are vulnerable to Command Injection. Arbitrary OS shell command execution is possible through a crafted command-line argument.

Remediation

There is no fixed version for jison.

References

medium severity

Arbitrary Code Injection

  • Vulnerable module: underscore
  • Introduced through: jsonpath@0.2.12

Detailed paths

  • Introduced through: configuration-handler@4.3.1 jsonpath@0.2.12 underscore@1.7.0
    Remediation: Upgrade to jsonpath@1.1.1.

Overview

underscore is a JavaScript's functional programming helper library.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the template function, particularly when the variable option is taken from _.templateSettings as it is not sanitized.

PoC

const _ = require('underscore');
_.templateSettings.variable = "a = this.process.mainModule.require('child_process').execSync('touch HELLO')";
const t = _.template("")();

Remediation

Upgrade underscore to version 1.13.0-2, 1.12.1 or higher.

References