Skip to main content

Nmap CVE-2026-137979

| EUVDEUVD-2026-137450 MEDIUM
Predictable Seed in Pseudo-Random Number Generator (PRNG) (CWE-337)
2026-11-27 VulnCheck GHSA-qh48-rv7f-wvq6
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Victim operator runs -sC NSE scan against attacker host
  2. Exploit
    Attacker observes math.random-derived values in NSE traffic
  3. Execution
    Brute-force the unseeded Lua PRNG seed
  4. Impact
    Recover heap address, weakening ASLR on scanner

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Unpredictable PRNG seeds
Exploitation Conditions

Exploitation requires the Nmap operator to run NSE scripts - specifically the default script scan (-sC) or equivalent script-enabled scan - against a host the attacker controls, and that host must be able to observe the math.random-derived values emitted in NSE script traffic to brute-force the unseeded Lua PRNG seed. This is why the CVSS vector carries UI:P (passive operator action): the malicious host cannot initiate the interaction, it only benefits when scanned. Limiting factors: impact is confined to leaking a heap address that weakens ASLR (no code execution, no integrity or availability impact), it only affects Nmap versions before 7.992, and it only applies when NSE scripts that exercise math.random are actually run against the attacker-controlled target.

Impact

This is a low-to-moderate severity information-disclosure issue (CVSS 4.0 base 5.3, Medium) that is correctly scored as such by multiple signals rather than an over-inflated high-CVSS finding. The 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L) shows a network-reachable, low-complexity, unauthenticated weakness whose only impact is partial confidentiality (VC:L) - specifically a heap address leak that weakens ASLR, with no integrity or availability impact (VI:N/VA:N) and no scope change (SC:N/SI:N/SA:N). The critical limiter is UI:P: the roles are inverted from a typical remote CVE - the 'attacker' is a malicious scanned host, and exploitation only occurs because the Nmap operator actively runs an NSE/-sC scan against that host. No EPSS score and no KEV status were provided, so exploitation probability and active-exploitation evidence are both unavailable; the vuln.today Decision label is 'this_month' (not act_now/emergency), consistent with a patchable, non-urgent weakness. No PoC or exploit-code reference is present among the inputs (only the patch commit, source lines, changelog, and the VulnCheck advisory). CWE-337 (predictable PRNG seed) and the commit confirm the mechanism precisely. Net: a genuine but narrow weakness that lowers an exploit mitigation (ASLR) rather than directly compromising a system - real priority for the next patch cycle, not an incident.

Exploit ScenarioDerived

An Nmap operator runs a default-script scan (-sC) against a host controlled by an adversary. Because NSE's math.random is never seeded, the malicious host observes math.random-derived values in the NSE script traffic, brute-forces the predictable Lua seed offline, and recovers a heap address from the scanning machine that reduces the effectiveness of ASLR for a follow-on exploit. No public exploit identified at time of analysis; the mechanism is confirmed by the vendor patch commit and CWE-337.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 27, 2026

Nmap releases before 7.992 leak a heap address to any host being scanned with NSE scripts enabled, because the Nmap Scripting Engine never explicitly seeds Lua's math.random generator. A malicious or attacker-controlled target that observes math.random-derived values in NSE script traffic during a -sC scan can brute-force the seed and recover a heap address, weakening ASLR for that Nmap process. The trigger requires the operator to run script-enabled scans against the hostile host (remote, unauthenticated from the attacker's side), impact is limited to confidentiality with no integrity or availability effect, and no public exploit has been identified at the time of analysis - the vendor has released a fix in 7.992.

RemediationAI

Vendor-released patch: upgrade to Nmap 7.992 or later, the release in which nse_main.lua seeds Lua's PRNG from nmap.get_random_bytes() via upstream commit https://github.com/nmap/nmap/commit/6aaada8c53425c6c390335f38d90184d04f1dae4; verify the installed version and consult the changelog at https://nmap.org/changelog.html or https://github.com/nmap/nmap/blob/v7.992/CHANGELOG for the entry. Where upgrading immediately is not possible, the exposure is eliminated by not running script-enabled scans (-sC, --script or equivalent) against hosts you do not control, since the leak requires NSE script traffic carrying math.random-derived values to reach an attacker-observable target; the trade-off is that disabling NSE removes service-probing and script-based detection from those scans, so restrict untrusted targets to plain port scans (-sS/-sT without --script) and reserve script scanning for trusted or internally owned hosts until the upgrade is applied.

Affected VersionsENISA

nmap 0 <7.992

Affected Packages

euvd nmap fix: 7.992

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is a predictable-seed weakness (CWE-337) in nse_main.lua, the Lua driver for the Nmap Scripting Engine. Lua's math.random is a deterministic PRNG that, when never seeded with math.randomseed, starts from the same default state on every Nmap run; consequently any NSE script that uses math.random emits values derived from a predictable sequence. Because those values travel over the network to the scanned host, the host - or anyone observing that traffic - can collect enough outputs to brute-force the seed and then predict additional math.random outputs, including a value the engine uses in a way that exposes a heap address. Disclosing that address gives an attacker ASLR-relevant layout information about the Nmap process, but the assessed vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N) confines impact to low confidentiality with no code execution, integrity or availability effect. The upstream commit 6aaada8c53425c6c390335f38d90184d04f1dae4 addresses the root cause by seeding Lua's PRNG with bytes from nmap.get_random_bytes() in run(), replacing the implicit constant state with OS-backed randomness. The relevant code is highlighted at nse_main.lua line 892 in the v7.992 tree referenced by the advisory.

Know when Nmap gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 4.3 MEDIUM

Network-reachable NSE traffic (AV:N), deterministic seed brute-force (AC:L), no attacker auth (PR:N), but the operator must run the scan (UI:R); only a partial heap-address leak, so C:L and I:N/A:N.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Nmap before 7.992 contains an information disclosure vulnerability in the Nmap Scripting Engine because nse_main.lua does not explicitly seed Lua's math.random generator. Malicious scanned hosts can observe math.random-derived values in NSE script traffic during -sC scans, brute-force the seed, and recover a heap address that weakens ASLR.

Threat Intelligence Overview

EPSS Score
0.4%
Top 73% exploitable
Prevalence
High
Nmap is a ubiquitous security/network-scanning tool across enterprises and practitioners
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Nmap

View all
CVE-2013-4885 MEDIUM POC
6.8 Oct 26

The http-domino-enum-passwords.nse script in NMap before 6.40, when domino-enum-passwords.idpath is set, allows remote s

CVE-2019-11490 HIGH POC
7.8 Apr 24

An issue was discovered in Npcap 0.992. Rated high severity (CVSS 7.8), this vulnerability is low attack complexity. Pub

CVE-2018-15173 HIGH POC
7.5 Aug 08

Nmap through 7.70, when the -sV option is used, allows remote attackers to cause a denial of service (stack consumption

CVE-2026-58058 MEDIUM POC
6.9 Jun 28

Out-of-bounds reads and a process crash in Nmap through 7.99 can be triggered remotely by any host that is being scanned

CVE-2026-137978 HIGH
7.7 Nov 27

A use-after-free in Nmap's parallel DNS resolver (DNS::ResolverImpl::process_request in libnetutil/massdns.cc) affects N

CVE-2026-137977 HIGH
7.7 Nov 27

Use-after-free in Nmap's parallel DNS resolver (libnetutil/massdns.cc) in all versions before 7.992 allows an attacker w

CVE-2026-81406 HIGH
7.1 Nov 25

Memory exhaustion in Nmap's db2-das-info NSE script lets a malicious or spoofed DB2 Administration Server on a scanned h

CVE-2026-81405 HIGH
7.1 Nov 25

Memory exhaustion in the Nmap Scripting Engine's rpc.lua library (Nmap before 7.992) lets a malicious ONC-RPC service on

CVE-2026-81408 HIGH
7.1 Nov 25

Memory exhaustion in Nmap's NSE scripting engine (versions before 7.992) lets a hostile DRDA service consume unbounded m

CVE-2026-81412 HIGH
7.1 Nov 25

Memory exhaustion and prolonged CPU spin in Nmap's NSE MSRPC library (nselib/msrpctypes.lua) affects Nmap releases befor

CVE-2026-81411 HIGH
7.1 Nov 25

A malformed RDP handshake response can hang the Nmap scanner process at 100% CPU indefinitely, because the rdp.lua NSE l

CVE-2026-81415 MEDIUM
6.0 Nov 25

Nmap releases before 7.992 can be driven into a permanent 100% CPU hang while running the NSE script tn3270-screen.nse (

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy