Arbitrary Command Injection Affecting pidusage package, versions <1.1.5


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Mature
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 Learn

Learn about Arbitrary Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDnpm:pidusage:20170605
  • published7 Jun 2017
  • disclosed5 Jun 2017
  • creditmicaksica

Introduced: 5 Jun 2017

CVE-2017-1000220  (opens in a new tab)
CVE-2017-16034  (opens in a new tab)
CWE-77  (opens in a new tab)

How to fix?

Upgrade pidusage to version 1.1.5 or higher.

Overview

pidusage is a package for Cross-platform process cpu % and memory usage of a PID. Affected versions of the package are vulnerable to Arbitrary Command Injection. It passes user input to child_process.exec without sanitization, which causes a command injection vulnerability in the ps function due to never casting the PID to an integer.

PoC:

var pid = require('pidusage');
pid.stat('1 && /usr/local/bin/python');

References

CVSS Scores

version 3.1