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

> An attacker can cause a crash in Nmap by sending crafted IPv6 responses during scans, due to an integer underflow in extension header parsing.

- **Severity:** Medium 6.9 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Jun 2026
- **Updated:** 29 Jun 2026
- **Also known as:** AZL-91391, CLSA-2026-1788628939, CLSA-2026-1788629925, DEBIAN-CVE-2026-58058, ECHO-c25e-3693-b903, GHSA-wxvj-hc4r-fq45, MGASA-2026-0268, MINI-ffcm-qx23-9736, OESA-2026-2955, OESA-2026-2956, OESA-2026-2957, OESA-2026-2958, OESA-2026-3094, SUSE-SU-2026:22739-1, SUSE-SU-2026:22814-1, SUSE-SU-2026:3333-1, SUSE-SU-2026:3340-1, UBUNTU-CVE-2026-58058

## What is CVE-2026-58058?

CVE-2026-58058 is a medium-severity vulnerability in Nmap, published on 28 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-191 (Integer Underflow (Wrap or Wraparound))

## Which versions are affected by CVE-2026-58058?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `nmap` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 7.92-150600.9.3.1 |
| `nmap` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 7.92-150600.9.3.1 |
| `nmap` | SUSE:Linux Enterprise Server 16.0 | All versions | 7.92-160000.3.1 |
| `nmap` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 6.46-3.9.1 |
| `nmap` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 7.92-160000.3.1 |
| `nmap` | SUSE:Linux Micro Extras 6.2 | All versions | 7.92-160000.3.1 |

Products: Nmap Nmap.

## How do I fix CVE-2026-58058?

Apply the vendor's patch.

## Is CVE-2026-58058 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-58058 exists.

Public exploit code:

- Nmap  7.99  - Extension Header Integer Underflow (exploitdb)

## Other vulnerabilities in Nmap

- [CVE-2017-18594](https://insights.sbomify.com/CVE-2017-18594/): Memory corruption in n/a (high 7.5)
- [CVE-2018-15173](https://insights.sbomify.com/CVE-2018-15173/): Denial of service in n/a (high 7.5)
- [CVE-2013-4885](https://insights.sbomify.com/CVE-2013-4885/): Path traversal in n/a (medium 6.8)
- [CVE-2018-1000161](https://insights.sbomify.com/CVE-2018-1000161/): Path traversal in n/a (medium 5.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-58058 and fix it if it is affected.

What it is: CVE-2026-58058 is a medium-severity vulnerability in Nmap, published on 28 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-58058 exists.

Affected product: Nmap. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-58058/ (Markdown: https://insights.sbomify.com/CVE-2026-58058/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-58058
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-58058
- OSV: https://osv.dev/vulnerability/CVE-2026-58058

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-58058/
Summaries are generated and may contain mistakes; the official description above is the record.
