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.
Published: 2026-07-12
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Zephyr’s IPv4 address parsing routine contains a stack‑buffer overflow when it processes address strings that include a colon and a long suffix. The routine copies the substring occurring after the colon into a fixed 17‑byte stack buffer without checking the actual length of the remainder of the input. A crafted string such as “1.2.3.4:” followed by an arbitrarily long payload exceeds this buffer and writes beyond its bounds, corrupting adjacent stack data. The attacker controls the content and length of the overflow, which can lead to a denial of service, memory corruption, and potentially a control‑flow hijack. The same unbounded copy flaw exists in the equivalent IPv6 “[addr]:port” parsing path, so both IPv4 and IPv6 address parsing can be triggered. This flaw is classified as CWE‑121.

Affected Systems

Affected systems: The vulnerability resides in the Zephyr RTOS networking subsystem, specifically in the file subsys/net/ip/utils.c. All Zephyr releases from version 1.9.0 through 4.4.0 contain the unbounded copy in both IPv4 (parse_ipv4) and IPv6 (parse_ipv6) parsing paths. The affected vendor is Zephyr Project, product Zephyr RTOS, and any embedded system running these versions may invoke the vulnerable routine via the standard socket API, DNS server‑string configuration, or the eswifi Wi‑Fi co‑processor DNS‑response path.

Risk and Exploitability

Risk and exploitability: The CVSS score of 8.1 indicates high severity, while the EPSS score of less than 1 % suggests a low current exploitation probability. The vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that the attacker can supply a malicious string over the network or through DNS to trigger the overflow, because the parser is reachable via normal network operations that resolve address strings. This leads to a denial of service or, with further exploitation, arbitrary code execution. The defect persists in the IPv6 parsing path, meaning that any destination string in the form “[addr]:port” is also susceptible.

Generated by OpenCVE AI on August 1, 2026 at 11:04 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Zephyr to a patched release (e.g., 4.4.1 or later) that removes the unbounded copy and validates the port length.
  • If an immediate upgrade is not possible, add pre‑validation to net_ipaddr_parse that rejects any string where the portion after the colon exceeds 17 characters, or otherwise limits the total length of the input string.
  • Disable the affected parsing path in custom builds if possible, or enforce strict input filtering at the application layer for all network‑influenced address strings.

Generated by OpenCVE AI on August 1, 2026 at 11:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 14 Jul 2026 19:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-787 CWE-121

Mon, 13 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sun, 12 Jul 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Zephyrproject
Zephyrproject zephyr
Vendors & Products Zephyrproject
Zephyrproject zephyr

Sun, 12 Jul 2026 16:45:00 +0000

Type Values Removed Values Added
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.
Title Stack buffer overflow in `net_ipaddr_parse()` IPv4 address-with-port parsing in `subsys/net/ip/utils.c`
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-07-14T18:38:43.193Z

Reserved: 2026-06-02T15:25:27.847Z

Link: CVE-2026-10666

cve-icon Vulnrichment

Updated: 2026-07-13T16:04:41.291Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T11:15:03Z

Weaknesses
  • CWE-121

    Stack-based Buffer Overflow