Arbitrary Command Injection Affecting pidusage package, versions <1.1.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
5.06% (92nd 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 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 Base Scores

version 3.1