Skip to content

PIDUsage Enables OS Command Injection

Critical severity GitHub Reviewed Published May 13, 2022 to the GitHub Advisory Database • Updated Apr 22, 2024

Package

npm pidusage (npm)

Affected versions

<= 1.1.4

Patched versions

None

Description

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.

References

Published by the National Vulnerability Database Nov 17, 2017
Published to the GitHub Advisory Database May 13, 2022
Reviewed Apr 22, 2024
Last updated Apr 22, 2024

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2017-1000220

GHSA ID

GHSA-h2p3-h48h-9jj7

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.