CVE-2026-137977

Nmap before 7.992 Use-After-Free via DNS Resolver handle_write

Published Nov 27, 2026 CVSS 4.0 · 7.7 High EPSS n/a KEV · Not listed
Description
Nmap before 7.992 contains a use-after-free vulnerability in DNS::ResolverImpl::handle_write 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.

Analysis

AI-generated

Technical impact

Nmap before version 7.992 contains a use‑after‑free flaw in the DNS::ResolverImpl::handle_write routine that frees request objects and later dereferences them after write completions. Attackers who can control or interpose on DNS traffic sent to Nmap can craft timed DNS responses together with forged ICMP port‑unreachable messages to trigger the invalid memory access. The consequence can be a crash of the Nmap process, leakage of memory contents that may include sensitive data, or the possibility of hijacking execution flow, which represents a severe compromise of confidentiality, integrity, or availability.

Affected Systems

The vulnerability affects the Nmap networking tool. All released versions prior to 7.992 are susceptible; users of these releases should verify the installed version and plan to update if necessary.

Risk and Exploitability

The CVSS score of 7.7 indicates a high severity. EPSS data is not available, so exact exploitation likelihood cannot be quantified, and the vulnerability is not listed in the CISA KEV catalog. The attack vector requires an attacker to control or be able to interpose on NIC traffic that Nmap receives, which is realistic for a network‑level adversary. Given the ability to hijack DNS responses, the vulnerability can be leveraged to destabilize scanning operations or, in the worst case, to compromise the process executing Nmap.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Nmap 7.992 or later, which removes the use‑after‑free in DNS::ResolverImpl::handle_write.
  • If upgrading immediately is not feasible, restrict Nmap’s network reach so that it only queries known good DNS servers or place Nmap behind a firewall that drops unexpected ICMP port‑unreachable packets.
  • Monitor for anomalous DNS replies and enforce firewall rules to block forged ICMP responses that could trigger the flaw, thereby reducing the attack surface.

Generated by OpenCVE AI on November 27, 2026 at 17:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description Nmap before 7.992 contains a use-after-free vulnerability in DNS::ResolverImpl::handle_write 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.
Title Nmap before 7.992 Use-After-Free via DNS Resolver handle_write
First Time appeared Nmap
Nmap nmap
Weaknesses CWE-416
CPEs cpe:2.3:a:nmap:nmap:*:*:*:*:*:*:*:*
Vendors & Products Nmap
Nmap nmap
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 7.7, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 27, 2026, 3:38 PM
Reserved
Nov 27, 2026, 3:30 PM
Status
Received
Published
Nov 27, 2026, 4:18 PM
Modified
Nov 27, 2026, 4:18 PM