cli@0.2.6 vulnerabilities

A tool for rapidly building command line apps

Direct Vulnerabilities

Known vulnerabilities in the cli package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • L
Insecure use of /tmp folder

cli is an npm package used for rapidly building command line apps.

When used in daemon mode, the library makes insecure use of two files in the /tmp/ folder: /tmp/<app-name>.pid and /tmp/<app-name>.log. These allow an attacker to overwrite files they typically cannot access, but that are accessible by the user running the CLI-using app. This is possible since the /tmp/ folder is (typically) writeable to all system users, and because the names of the files in question are easily predicted by an attacker.

Note that while this is a real vulnerability, it relies on functionality (daemon mode) which is only supported in very old Node versions (0.8 or older), and so is unlikely to be used by most cli users. To avoid any doubt, the fixed version (1.0.0) removes support for this feature entirely.

This vulnerability has also been assigned CVE-2016-1000021.

How to fix Insecure use of /tmp folder?

Upgrade cli to version 1.0.0 or greater, which disables the affected feature.

From the fix release notes:

This feature relies on a beta release (e.g. version 0.5.1) of a Node.js
module on npm--one that was superseded by a stable (e.g. version 1.0)
release published three years ago [2]. Due to a build-time dependency on
the long-since deprecated `node-waf` tool, the module at that version
can only be built for Node.js versions 0.8 and below.

Given this, actual usage of this feature is likely very limited. Remove
it completely so the integrity of this module's core functionality can
be verified.

<1.0.0