Command Injection

Affecting devcert-sanscache package, versions <0.4.7

Do your applications use this vulnerable package? Test your applications

Overview

devcert-sanscache is a package that can be used to generate trusted local SSL/TLS certificates for local SSL development.

Affected versions of this package are vulnerable to Command Injection. The variable commonName controlled by user input is used as part of the exec function without any sanitization.

PoC by JHU System Security Lab

var root = require("devcert-sanscache");
var attack_code = "&touch Song&";
root(attack_code);

Remediation

Upgrade devcert-sanscache to version 0.4.7 or higher.

References

CVSS Score

7.5
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    None
  • Availability
    None
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:P/RL:O/RC:C
Credit
JHU System Security Lab
CVE
CVE-2019-10778
CWE
CWE-78
Snyk ID
SNYK-JS-DEVCERTSANSCACHE-540926
Disclosed
08 Jan, 2020
Published
08 Jan, 2020