# CVE-2026-10666: Stack buffer overflow in `net_ipaddr_parse()` IPv4 address-with-port parsing in `subsys/net/ip/utils.c`

> A stack buffer overflow in Zephyr RTOS allows attackers to execute arbitrary code or cause denial of service via crafted IPv4 address strings.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 12 Jul 2026
- **Updated:** 15 Oct 2026
- **Also known as:** GHSA-532c-7g7f-jhmh

## What is CVE-2026-10666?

CVE-2026-10666 is a high-severity memory corruption vulnerability in Zephyrproject Zephyr, published on 12 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

parse_ipv4() in subsys/net/ip/utils.c (reached via net_ipaddr_parse() for strings of the form "a.b.c.d:port") copies the port substring into a fixed 17-byte stack buffer (char ipaddr[NET_IPV4_ADDR_LEN + 1]) using a length of str_len - end - 1, where str_len is the full, unbounded input length and end is only the (<=15-byte) offset of the ':' delimiter. Because the destination size is never consulted, a crafted address string with a long suffix after the colon (e.g. "1.2.3.4:" followed by hundreds of bytes) causes an out-of-bounds stack write whose length and contents are fully attacker-controlled (memcpy of the suffix plus a trailing NUL), enabling memory corruption and at minimum a denial of service, and potentially control-flow hijack. The parser is reached from the standard socket API (zsock_getaddrinfo / literal-address resolution), DNS server-string configuration, and the eswifi Wi-Fi co-processor DNS-response path, so an application that resolves a network-influenced address string is exposed. The bug was introduced when the parser was added (Zephyr v1.9.0) and shipped in all releases through v4.4.0. The fix removes the unbounded copy and validates the port length before copying into a small dedicated buffer. Note: the equivalent IPv6 "[addr]:port" path in parse_ipv6() retains the same unbounded copy at this commit and remains a separate, still-reachable instance of the defect.

Weakness: CWE-121 (Stack-based Buffer Overflow)

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

It affects 1 product.


Products: Zephyrproject Zephyr.

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

No fix has been published for CVE-2026-10666 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-10666 being exploited?

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

## Other vulnerabilities in Zephyrproject Zephyr

- [CVE-2026-5067](https://insights.sbomify.com/CVE-2026-5067/): Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key (critical 9.8)
- [CVE-2022-3806](https://insights.sbomify.com/CVE-2022-3806/): Bluetooth HCI Error Handling Double Free (critical 9.8)
- [CVE-2017-14199](https://insights.sbomify.com/CVE-2017-14199/): Memory corruption in getaddrinfo (critical 9.8)
- [CVE-2018-1000800](https://insights.sbomify.com/CVE-2018-1000800/): Null dereference in n/a (critical 9.8)
- [CVE-2021-3329](https://insights.sbomify.com/CVE-2021-3329/): DOS: Incorrect handling of the initial HCI ACL_MTU handshake packet leads to crash of bluetooth host layer (critical 9.6)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-10666 is a high-severity memory corruption vulnerability in Zephyrproject Zephyr, published on 12 Jul 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-10666 exists.

Affected product: Zephyrproject Zephyr. 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-10666/ (Markdown: https://insights.sbomify.com/CVE-2026-10666/index.md)
```

## Sources

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

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