6.9medium
Nmap - Integer Underflow in IPv6 Extension Header Parsing
- Severity
- 6.9medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 1.37% (higher than 72% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Nmap Nmap | up to 7.99 | CVE List, NVD |
All scores
| VulnCheck | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L |
| VulnCheck | 6.9medium CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Nmap hasta la versión 7.99 no mantiene el recorrido del encabezado de extensión IPv6 dentro del paquete capturado en ipv6_get_data_primitive (libnetutil/netutil.cc), por lo que el puntero avanza más allá del búfer y el cálculo de la longitud restante sufre un desbordamiento negativo a un valor grande. Un objetivo escaneado o un atacante en la ruta que devuelve una respuesta IPv6 manipulada con un encabezado de extensión truncado puede desencadenar lecturas fuera de límites y un fallo durante los escaneos IPv6 sin procesar.
References
| https://github.com/bikini/exploitarium/tree/main/nmap-ipv6-extlen-wrap-poc | broken-link, exploit, third-party-advisory | |
| https://github.com/nmap/nmap/commit/bb6754e76bb1686315008e1aa1c40202a513fb83 | patch | |
| https://nmap.org/changelog.html | patch, release-notes | |
| https://www.vulncheck.com/advisories/nmap-integer-underflow-in-ipv6-extension-header-parsing | patch, third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-58058 changed 2026-06-29 | CVE Terms of Use |
| NVD | CVE-2026-58058 changed 2026-10-25 | Public domain |