npm-programmatic@0.0.7 vulnerabilities

Use NPM commands programmatically

Direct Vulnerabilities

Known vulnerabilities in the npm-programmatic 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
Command Injection

npm-programmatic is a library that allows you to access npm commands programmatically from javascript.

Affected versions of this package are vulnerable to Command Injection. The packages and option properties are concatenated together without any validation and are used by the exec function directly.

PoC

var root = require("npm-programmatic");
var attack_code = "& echo vulnerable > create.txt &";
root.install([attack_code], {"cwd": "./"});

How to fix Command Injection?

There is no fixed version for npm-programmatic.

*