Advisories for Npm/Pidusage package

2022

PIDUsage Enables OS Command Injection

Overview Affected versions of pidusage pass unsanitized input to child_process.exec(), resulting in arbitrary code execution in the ps method. This package is vulnerable to this PoC on Darwin, SunOS, FreeBSD, and AIX. Windows and Linux are not vulnerable. Proof of Concept var pid = require('pidusage'); pid.stat('1 && /usr/local/bin/python'); Remediation Update to version 1.1.5 or later.

2020
2017

Command Injection

The pidusage module passes unsanitized input to child_process.exec, resulting in command injection in the ps method, as the pid is never cast to an integer as the comment expects. This module is vulnerable to this PoC on Darwin, SunOS, FreeBSD, and AIX. Windows and Linux are not vulnerable.