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
View

Attack ChainAIDerived

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

  1. Recon
    Nmap initiates raw IPv6 scan toward target
  2. Delivery
    Attacker controls scan target or intercepts response path
  3. Exploit
    Attacker returns crafted IPv6 packet with truncated extension header
  4. Install
    ipv6_get_data_primitive reads HEL byte without validating full 8-byte header fits in buffer
  5. C2
    Walk pointer advances past captured packet end
  6. Execute
    Unsigned remaining-length underflows to large value
  7. Impact
    Out-of-bounds reads and Nmap process crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer underflow checks
Exploitation Conditions

Exploitation requires that the victim machine be actively running Nmap in a raw IPv6 scan mode (any mode that processes received IPv6 extension headers via ipv6_get_data_primitive, such as -sS, -sU, -sN, or similar scan types combined with -6). The attacker must control a host that is a direct scan target of the Nmap session, OR occupy an on-path network position capable of injecting or substituting IPv6 response packets. No authentication to any service is required, but the attack is response-triggered - the Nmap process must initiate contact first. Non-IPv6 scans (IPv4-only) are entirely unaffected. The attack does not apply to Nmap version output phases, scripting engine activity, or any feature that does not invoke raw IPv6 packet parsing.

Impact

The CVSS 4.0 base score of 6.9 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L) correctly captures that this is a network-reachable, unauthenticated, low-complexity flaw with limited confidentiality and availability impact. The key operational constraint that moderates real-world risk is the attack direction: exploitation is not attacker-initiated toward Nmap - the victim Nmap process must initiate a raw IPv6 scan that reaches an adversarial target or traverse an on-path attacker. This means the attack surface is limited to active IPv6 scanning sessions against untrusted targets, which is a non-trivial precondition. The primary impact is denial of service (Nmap process crash) with a secondary out-of-bounds read component that could leak portions of Nmap process memory. This vulnerability is not listed in CISA KEV, but a public proof-of-concept exists, elevating urgency compared to a theoretical issue. EPSS data was not provided in the input and cannot be independently assessed here. For organizations running continuous or automated IPv6 scans, this is a genuine medium-priority issue; for teams using Nmap ad-hoc or exclusively for IPv4, exposure is minimal. No CVSS vector conflict detected - the network vector is accurate given the remote crafted-packet delivery mechanism.

Exploit ScenarioDerived

A security engineer runs an Nmap raw IPv6 scan (nmap -6 -sS) against a target IP range that includes a host controlled by a threat actor; the malicious host returns a specially crafted IPv6 response containing a truncated extension header, triggering the integer underflow in ipv6_get_data_primitive. The Nmap process reads out-of-bounds memory, potentially leaking fragments of process memory, then crashes - aborting the scan. A public proof-of-concept is available at https://github.com/bikini/exploitarium/tree/main/nmap-ipv6-extlen-wrap-poc, making replication straightforward for any host that can respond to incoming scans.

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

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

Alert me

AnalysisAIv1 – Jun 28, 2026

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.

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.

Affected VersionsENISA

nmap 0 ≤7.99

Affected Packages

euvd nmap no fix

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

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).

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 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
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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

Lifecycle Timeline

1
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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
High
widely used open-source network scanner in enterprise security and IT tooling
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
9 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL Exploit-DB GitHub VulDB

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 Yes
EPSS 0.3%
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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-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 (

CVE-2026-81414 MEDIUM
6.0 Nov 25

Memory exhaustion and quadratic CPU consumption in Nmap before 7.992 can be induced through the NSE dns.lua library when

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

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