# CVE-2026-58058: Nmap - Integer Underflow in IPv6 Extension Header Parsing

- Severity: Medium 6.9 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.37%, higher than 72% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-28T01:32:59.336Z
- Modified: 2026-10-25T17:10:00.197Z
- Weaknesses: CWE-191
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- Nmap Nmap: up to 7.99

## Every score

- VulnCheck: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L`
- VulnCheck: CVSS:4.0 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`

## References

- <https://github.com/bikini/exploitarium/tree/main/nmap-ipv6-extlen-wrap-poc> (exploit, broken-link, 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

- CVE List: [CVE-2026-58058](https://www.cve.org/CVERecord?id=CVE-2026-58058), CVE Terms of Use, modified 2026-06-29
- NVD: [CVE-2026-58058](https://nvd.nist.gov/vuln/detail/CVE-2026-58058), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-58058 · Whole record: https://cve.day/CVE-2026-58058.json · Rebuilt by cve.day 2026-11-25T22:59:26.569Z
