CVE-2026-58058

Nmap - Integer Underflow in IPv6 Extension Header Parsing

Published Jun 28, 2026 CVSS 4.0 · 6.9 Medium EPSS 1.5% KEV · Not listed
Description
Nmap through 7.99 does not keep the IPv6 extension-header walk within the captured packet in ipv6_get_data_primitive (libnetutil/netutil.cc), so the pointer advances past the buffer and the remaining-length computation underflows to a large value. A scanned target or on-path attacker returning a crafted IPv6 response with a truncated extension header can trigger out-of-bounds reads and a crash during raw IPv6 scans.

Analysis

AI-generated

Technical impact

The reported flaw is an integer underflow in the IPv6 extension-header parsing routine of Nmap. When a scanner processes a crafted IPv6 response that contains a truncated extension header, the parser calculates a remaining length that underflows, resulting in an out‑of‑bounds read before the program crashes. This vulnerability does not grant code execution or system compromise; at worst it causes the scanning tool to crash, denying its availability. The weakness corresponds to CWE‑191 (Integer Underflow or Wraparound) and CWE‑125 (Out‑of‑Bounds Access).

Affected Systems

The weakness is present in the Nmap network mapping tool from the Nmap project. Vulnerable releases include all Nmap versions 7.99 and earlier. No other vendors or product lines are impacted according to the available data.

Risk and Exploitability

The CVSS score for this issue is 6.9, indicating a moderate severity and a likelihood that an unauthenticated attacker can affect the stability of the scanning host. EPSS is reported as <1%, indicating a very low but nonzero probability of exploitation, and the flaw is not listed in the CISA KEV catalog. The attack vector is remote, requiring an attacker to send a specially crafted IPv6 packet to a host that is performing a raw IPv6 scan. If such a packet is processed, the scanner will crash, interrupting the scan and potentially impacting operations in environments that rely on continuous vulnerability assessment. No privilege escalation or confidentiality compromise is possible with this flaw.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Nmap to a patched release, such as 7.100 or later, which includes the fix from commit bb6754e.
  • If you must remain on an older version, avoid using the raw IPv6 scan option (-6) until the software can be updated.
  • Restrict inbound IPv6 traffic to the scanning host by implementing firewall rules that block suspicious IPv6 packets from untrusted networks.

Generated by OpenCVE AI on June 30, 2026 at 01:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Nmap through 7.99 does not keep the IPv6 extension-header walk within the captured packet in ipv6_get_data_primitive (libnetutil/netutil.cc), so the pointer advances past the buffer and the remaining-length computation underflows to a large value. A scanned target or on-path attacker returning a crafted IPv6 response with a truncated extension header can trigger out-of-bounds reads and a crash during raw IPv6 scans.
Title Nmap - Integer Underflow in IPv6 Extension Header Parsing
First Time appeared Nmap
Nmap nmap
Weaknesses CWE-191
CPEs cpe:2.3:a:nmap:nmap:*:*:*:*:*:*:*:*
Vendors & Products Nmap
Nmap nmap
References
Metrics cvssV3_1

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

cvssV4_0

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

Weaknesses
  • CWE-125

    Out-of-bounds Read

  • CWE-191

    Integer Underflow (Wrap or Wraparound)

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jun 29, 2026, 2:53 PM
Reserved
Jun 28, 2026, 12:58 AM
Status
Analyzed
Published
Jun 28, 2026, 2:16 AM
Modified
Oct 25, 2026, 5:10 PM
Severity
Moderate
Public date
Jun 28, 2026, 1:32 AM