Command Injection

Affecting mversion package, versions <2.0.1

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

Overview

mversion is a cross packaging manager module version handler/bumper.

Affected versions of this package are vulnerable to Command Injection. The issue occurs because tagName user input is formatted inside the exec function is executed without any checks.

PoC:

var mversion = require('mversion');

mversion.update({
       version: "major",
       commitMessage: "testing",
       tagName: "; touch hbkhan",
 })

Remediation

Upgrade mversion to version 2.0.1 or higher.

References

CVSS Score

8.4
high severity
  • Attack Vector
    Local
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    High
  • Availability
    High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:R
Credit
Habib Ullah
CVE
CVE-2020-7688
CWE
CWE-78
Snyk ID
SNYK-JS-MVERSION-573174
Disclosed
24 Jun, 2020
Published
25 Jun, 2020