Command Injection

Affecting connection-tester package, versions <0.2.1

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

connection-tester is a module that tests to check if the connection can be established or host/port reachable for a given host and port. Useful for testing all the connection in your node application at server startup.

Affected versions of this package are vulnerable to Command Injection. The injection point is located in line 15 in index.js.

The following PoC demonstrates the vulnerability:

PoC

var a = require("connection-tester");
a.test("& touch 111","& touch 222",123)

Remediation

Upgrade connection-tester to version 0.2.1 or higher.

References

CVSS Score

9.8
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    High
  • Availability
    High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Credit
JHU System Security Lab
CVE
CVE-2020-7781
CWE
CWE-78
Snyk ID
SNYK-JS-CONNECTIONTESTER-1048337
Disclosed
04 Dec, 2020
Published
16 Dec, 2020