Skip to main content

Nmap CVE-2026-58058

| EUVDEUVD-2026-39978 MEDIUM
Integer Underflow (CWE-191)
2026-06-28 VulnCheck GHSA-wxvj-hc4r-fq45
6.9
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
6.9 MEDIUM
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
6.5 MEDIUM

Network vector because exploit is delivered via a crafted IPv6 response; PR:N since no privileges on the Nmap host are needed; no integrity impact; low C and A reflecting OOB read and process crash only.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE
6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Red Hat
6.5 MEDIUM
qualitative

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

3
Source Code Evidence Fetched
Jun 28, 2026 - 02:32 vuln.today
Analysis Generated
Jun 28, 2026 - 02:32 vuln.today
CVSS changed
Jun 28, 2026 - 02:22 NVD
6.5 (MEDIUM) 6.9 (MEDIUM)

DescriptionCVE.org

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.

AnalysisAI

Out-of-bounds reads and a process crash in Nmap through 7.99 can be triggered remotely by any host that is being scanned, or by an on-path attacker, via a crafted IPv6 packet with a truncated extension header. The root cause is an integer underflow in the ipv6_get_data_primitive function (libnetutil/netutil.cc) where an insufficiently strict bounds check allows the extension-header walk pointer to advance past the captured packet buffer, causing the remaining-length subtraction to wraparound to a very large value. A publicly available exploit proof-of-concept exists; this vulnerability is not currently listed in the CISA KEV catalog.

Technical ContextAI

Nmap's raw packet engine uses ipv6_get_data_primitive in libnetutil/netutil.cc to walk IPv6 extension headers (as defined in RFC 8200) in order to locate the upper-layer protocol payload during raw IPv6 scans. Each IPv6 extension header has a minimum size of 8 bytes: one Next Header byte, one Header Extension Length (HEL) byte, and at least 6 bytes of data. The original code checked only that 2 bytes remained before reading the HEL byte and computing the next header offset as (hdrlen + 1) * 8 - without verifying the full declared length actually fit within the captured packet boundary. This allowed the walk pointer p to advance beyond end. The subsequent remaining = end - p computation, operating on unsigned integer types, then underflowed to a very large positive value (CWE-191: Integer Underflow/Wraparound), rendering all downstream buffer bounds checks ineffective and permitting arbitrary out-of-bounds reads and a crash. The upstream fix (commit bb6754e76bb1686315008e1aa1c40202a513fb83) corrects the initial check from p + 2 > end to p + 8 > end and adds an explicit if (p >= end) return NULL guard. Affected CPE: cpe:2.3:a:nmap:nmap:*:*:*:*:*:*:*:* (all versions through 7.99).

RemediationAI

Apply the upstream fix by building Nmap from the patched source incorporating commit bb6754e76bb1686315008e1aa1c40202a513fb83 (https://github.com/nmap/nmap/commit/bb6754e76bb1686315008e1aa1c40202a513fb83); a specific tagged release version incorporating this fix was not independently confirmed from the available data, so monitor https://nmap.org/changelog.html for the next published release and upgrade once it appears. Upstream fix is available (commit confirmed); released patched version not independently confirmed. As a compensating control where patching is not immediately feasible, restrict Nmap usage to IPv4-only scans by omitting the -6 flag and raw IPv6 scan types - this entirely removes the vulnerable code path with no functional impact on IPv4 scanning workflows. Alternatively, restrict scan targets to fully trusted, internally controlled hosts, eliminating the adversarial-response attack vector; however, this may not be operationally viable in external assessment scenarios. There are no known side effects to the upstream patch.

Vendor StatusVendor

Debian

Bug #1140916
nmap
Release Status Fixed Version Urgency
bullseye vulnerable 7.91+dfsg1+really7.80+dfsg1-2 -
bookworm vulnerable 7.93+dfsg1-1 -
trixie vulnerable 7.95+dfsg-3 -
forky, sid vulnerable 7.99+dfsg-1 -
(unstable) fixed (unfixed) -

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Module for Basesystem 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

Share

CVE-2026-58058 vulnerability details – vuln.today

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