Remote Shell Command Injection Affecting gm package, versions <1.21.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

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 npm:gm:20151026
  • published 6 Nov 2015
  • disclosed 26 Oct 2015
  • credit Brendan Scarvell of Console

How to fix?

Upgrade gm to version 1.21.1 or greater.

If a direct dependency update is not possible, use snyk wizard to patch this vulnerability.

Overview

The gm package is the GraphicsMagick and ImageMagick wrapper for Node.js. The compare() function allows comparing of two images, taking as an input argument the path to both images. The function, in versions prior to 1.21.1, fails to sanitize the input correctly, making it vulnerable to a command injection attack.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
6.5 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    Low
  • Availability (A)
    None