Skip to content

pid parameter subject to command injection #49

@astanciu

Description

@astanciu

You should probably validate that pid is a digit only string. This line in ps.js is not very secure:
exec('ps -o "rss,vsize,pcpu" -p ' + pid, function(err, stdout, stderr) {

I got this to work on OSX:
usage.lookup("123; say foobar", options, function(err, result, p) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions