Arbitrary Code Injection Affecting open package, versions <6.0.0


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

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 Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-OPEN-174041
  • published31 Mar 2019
  • disclosed16 May 2018
  • creditChaLKer

Introduced: 16 May 2018

CVE NOT AVAILABLE CWE-94  (opens in a new tab)

How to fix?

Upgrade open to version 6.0.0 or higher.

Overview

open is a cross platform package that opens stuff like URLs, files, executables.

Affected versions of this package are vulnerable to Arbitrary Code Injection when unsanitized user input is passed in.

The package does come with the following warning in the readme:

The same care should be taken when calling open as if you were calling child_process.exec directly. If it is an executable it will run in a new shell.

The package open is replacing the opn package, which is now deprecated. The older versions of open are vulnerable.

Note: Upgrading open to the last version will prevent this vulnerability but is also likely to have unwanted effects since it now has a very different API.

CVSS Scores

version 3.1