Vulnerabilities

1 via 1 paths

Dependencies

343

Source

GitHub

Commit

332f718d

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
Status
  • 1
  • 0
  • 0

medium severity

Arbitrary Code Injection

  • Vulnerable module: underscore
  • Introduced through: nodemailer-smtp-transport@2.7.4

Detailed paths

  • Introduced through: destiny-ghost-api@chrispaskvan/destiny-ghost-api#332f718dfc820716fa3ab16c058d57c67346fa29 nodemailer-smtp-transport@2.7.4 smtp-connection@2.12.0 httpntlm@1.6.1 underscore@1.7.0

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