Monday, October 12, 2026

nmap-vulners for turning service scans into ranked CVE and exploit intelligence

nmap-vulners for turning service scans into ranked CVE and exploit intelligence

nmap-vulners is a single NSE script that enriches every software fingerprint nmap produces with CVEs, CVSS scores, EPSS estimates and exploit availability from vulners.com, for authorized assessment and defensive inventory work.

ToolvulnersCom/nmap-vulners — an nmap NSE script that queries vulners.com for every service version fingerprinted during a scan and prints ranked CVE, exploit and KEV data inline
CategoryVulnerability intelligence / network scanning enrichment (Lua, NSE)
Primary UseEnriching authorized nmap -sV scans so each identified service — expressed as a cpe:/a:... identity — is annotated with CVSS scores, EPSS likelihood, KEV and EXP flags
Safe UseUse during authorized penetration tests, internal asset inventories, and lab assessments where you have permission to scan; the script deliberately sends software identities to a third party, so scope consent matters
Telemetry NoteThe script makes outbound HTTPS lookups to vulners.com containing the CPE identity of scanned software; defenders can observe its use via egress to the Vulners API and the associated nmap -sV probe traffic on target networks

nmap has always answered the question of *what* is listening on a port; nmap-vulners answers the follow-up question every operator actually cares about: what is wrong with it. Maintained by vulnersCom and written in Lua as a single vulners.nse NSE script, the tool takes each software identity that nmap -sV already derived, queries the vulners.com database, and prints a ranked block of findings directly inside the standard scan report. The ranking is deliberately not just highest-CVSS-first: the README states findings are ordered so things people are actually being attacked with come first, which is a meaningful design choice for triage. With roughly 3.5k stars and an active CI badge, this is one of the more mature enrichment scripts in the NSE ecosystem.

The invocation surface is minimal — the README calls two flags the whole interface. nmap -sV --script vulners <target> is the canonical form, and the documentation is unusually explicit about why -sV is not optional: without version detection there is no software identity to query, and an empty result is almost always traced back to a missing -sV. Equally notable is that the script is intentionally excluded from nmap's default script category, so a plain -sC will not fire it. The stated rationale is privacy-conscious: sending the identity of your target's software to a third party should be an explicit opt-in, which is a policy position more scanning tools should adopt.

Installation is handled by an install.sh for macOS, Linux, Kali and WSL, and install.ps1 for Windows. The installer asks nmap where it keeps its data, copies the script there, rebuilds the script database, and then verifies that --script vulners actually resolves to the newly installed file. That verification step exists because nmap ships a vulners.nse of its own, and the community edition here replaces it — a subtlety that has clearly caused confusion historically. A --user flag installs into ~/.nmap without root, --prefix targets a custom directory, --ref pins a release, and --uninstall reverses everything.

One operational trap documented prominently: if you run the script directly from a checkout with nmap --script ./vulners.nse, a relative path resolves against nmap's own script.db first and silently executes the bundled legacy copy instead. The fix is to always pass an absolute path. The README also instructs 1.x upgraders to delete leftover vulners_enterprise.nse and http-vulners-regex.nse, since a stale http-vulners-regex.nse still carries the default category and keeps sweeping targets under a plain -sC — exactly the behavior the new version was designed to avoid.

The output format rewards close reading. Under each port, a header line names one cpe:/a:vendor:product:version identity and summarizes the result — for the README's worked example, cpe:/a:apache:http_server:2.4.7 yields 272 findings, 56 exploitable. A single port can produce several such blocks, because a web service may expose the server, the PHP behind it, and client-side libraries like jQuery on the page. Below the header, a table with SEVERITY, CVSS, an AI/EPSS likelihood column, FLAGS, and a full LINK enumerates the top ten findings, with a closing line counting what was withheld — -v shows everything, -vv adds the URL where each identity was found. Crucially, the complete set is always present in -oX machine-readable output regardless of screen verbosity.

The FLAGS column is where the triage value concentrates. KEV marks vulnerabilities CISA has confirmed as exploited in the wild; EXP marks findings that are published exploit code or have exploit code attached; an empty cell means neither is known. Combined with the likelihood column, this lets an analyst distinguish a theoretical 9.8 from a 9.1 that is being actively weaponized — precisely the distinction pure CVSS sorting destroys. The README is candid that CVSS measures how bad a bug is *if* exploited, not how likely exploitation is, and structures the whole output around that epistemological gap.

The freemium model is documented with unusual thoroughness, including a side-by-side of the identical scan run keyless and keyed. For software nmap identified, the free lookup returns exactly the same CVE list as the paid one — the difference is enrichment. Without a key you get an AI likelihood estimate and fewer items flagged as exploitable (56 vs 78 in the example); with a free key you get true EPSS percentages (>99%, 97%), more EXP coverage, and KEV context. There is no mode flag to configure: the script discovers whatever key it can use in the usual places and degrades gracefully without one.

Architecturally, the tool is deliberately stateless. The script downloads its fingerprint data at scan time and writes nothing to disk, which the README frames as eliminating the classic failure mode of a script that runs, finds nothing because its local data is stale, and says nothing about why. There is exactly one paid operation, branded smart audit, which extracts findings from ports nmap could not fingerprint at all; it never runs for identified ports and vulners.max_items=0 disables it entirely. Keyless scans report at the end how many unidentified ports they saw, giving you a quantitative sense of what you might be missing.

A web sweep capability extends coverage beyond version banners: the demo shows nmap's -sV reporting only a Coyote banner while the sweep identifies the Tomcat server and the jQuery library behind it — the fingerprints come from Vulners' database and each identity is attributed to the URL it was found on at -vv. The README also carries a section on scanning politely, which fits the tool's overall posture of consent-aware, third-party-involving reconnaissance rather than raw aggression.

In an authorized workflow, nmap-vulners slots in as the bridge between reconnaissance and vulnerability management: it converts a service inventory into a prioritized risk picture in one command, without running a single exploit or intrusive check against the target. For defenders, the same output doubles as an attack-surface audit of your own estate — which services map to KEV entries is arguably the single most actionable number in the report. Watch two things in operational use: the license is NOASSERTION (an Nmap Public Source badge in the README, but verify before commercial redistribution), and every scan leaks fingerprinted CPE identities to vulners.com, which is fine for scanme-style targets and your own ranges, but worth a policy check before pointing it at a client's crown-jewel identifiers.

Official project repository for vulnersCom/nmap-vulners.
Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.

Sponsored
Share articleFacebookXLinkedIn

Continue exploring

Browse all articles →

0 comentários:

Post a Comment

Note: Only a member of this blog may post a comment.