Command Injection Affecting mversion package, versions <2.0.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.37% (74th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-MVERSION-573174
  • published 25 Jun 2020
  • disclosed 24 Jun 2020
  • credit Habib Ullah

How to fix?

Upgrade mversion to version 2.0.1 or higher.

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", })

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.4 high
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

7.8 high