CVE-2026-137977: Nmap before 7.992 Use-After-Free via DNS Resolver handle_write
Nmap before 7.992 contains a use-after-free vulnerability in DNS::ResolverImpl::handlewrite in libnetutil/massdns.cc that dereferences freed request objects after writes complete. Attackers controlling or on-path to a DNS server can send timed DNS responses with forged ICMP port-unreachable messages to crash scans, disclose memory, or hijack execution.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.992
Event History
Frequently Asked Questions
Which deployments are exposed?
Nmap versions before 7.992 are affected when performing DNS resolution. Exposure is most relevant when scans use DNS servers that an attacker controls or can interfere with on the network path.
What does an attacker need to exploit this issue?
The attacker must be able to provide timed DNS responses and forge ICMP port-unreachable messages. No Nmap privileges are required, but the CVSS vector indicates user interaction is required.
What is the impact of successful exploitation?
An attacker may crash scans, disclose process memory, or potentially hijack execution by causing freed DNS request objects to be dereferenced after writes complete.
How can I remediate the vulnerability?
Upgrade Nmap to version 7.992 or later. The issue is addressed by the referenced upstream commits.