CVE-2026-10666: memory-safety in zephyrproject zephyr
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.
AI Analysis
Technical Summary
The vulnerability in Zephyr's parse_ipv4() function arises from copying a port substring from an input string into a fixed 17-byte stack buffer without validating the length of the substring. The input string format is "a.b.c.d:port", where the port substring length is calculated as str_len - end - 1, with str_len being unbounded and end being the position of the colon delimiter (<=15). This unchecked copy leads to an out-of-bounds stack write, allowing an attacker to control the length and content of the overflow, potentially causing memory corruption, denial of service, or control-flow hijacking. The parser is used in multiple network-related paths, including socket API address resolution and DNS server configuration, exposing applications that process network-influenced address strings. The bug was introduced in Zephyr v1.9.0 and affects all releases through v4.4.0. The fix removes the unbounded copy and adds port length validation. Note that a similar vulnerability remains in the IPv6 parser (parse_ipv6()).
Potential Impact
This vulnerability allows an attacker to cause out-of-bounds stack writes by providing a crafted IPv4 address string with an excessively long port suffix. The impact includes memory corruption, which can lead to denial of service or potentially allow an attacker to hijack control flow of the affected system. Because the vulnerable code is reachable via standard socket API calls and DNS configuration paths, any application resolving network-influenced address strings is exposed. The CVSS v3.1 score is 8.1, indicating high severity with network attack vector, high impact on confidentiality, integrity, and availability, and requiring high attack complexity.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The description states that a fix has been implemented to remove the unbounded copy and validate port length before copying. Users should apply the official fix from the Zephyr project once available. Until patched, avoid processing untrusted or network-influenced IPv4 address strings with port suffixes or implement input validation to restrict port substring length. Note that the IPv6 parser remains vulnerable and should be considered in mitigation strategies.
CVE-2026-10666: memory-safety in zephyrproject zephyr
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.
CVSS v3.1
Score 8.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Zephyr's parse_ipv4() function arises from copying a port substring from an input string into a fixed 17-byte stack buffer without validating the length of the substring. The input string format is "a.b.c.d:port", where the port substring length is calculated as str_len - end - 1, with str_len being unbounded and end being the position of the colon delimiter (<=15). This unchecked copy leads to an out-of-bounds stack write, allowing an attacker to control the length and content of the overflow, potentially causing memory corruption, denial of service, or control-flow hijacking. The parser is used in multiple network-related paths, including socket API address resolution and DNS server configuration, exposing applications that process network-influenced address strings. The bug was introduced in Zephyr v1.9.0 and affects all releases through v4.4.0. The fix removes the unbounded copy and adds port length validation. Note that a similar vulnerability remains in the IPv6 parser (parse_ipv6()).
Potential Impact
This vulnerability allows an attacker to cause out-of-bounds stack writes by providing a crafted IPv4 address string with an excessively long port suffix. The impact includes memory corruption, which can lead to denial of service or potentially allow an attacker to hijack control flow of the affected system. Because the vulnerable code is reachable via standard socket API calls and DNS configuration paths, any application resolving network-influenced address strings is exposed. The CVSS v3.1 score is 8.1, indicating high severity with network attack vector, high impact on confidentiality, integrity, and availability, and requiring high attack complexity.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The description states that a fix has been implemented to remove the unbounded copy and validate port length before copying. Users should apply the official fix from the Zephyr project once available. Until patched, avoid processing untrusted or network-influenced IPv4 address strings with port suffixes or implement input validation to restrict port substring length. Note that the IPv6 parser remains vulnerable and should be considered in mitigation strategies.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-02T15:25:27.847Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a54991068715ace436e94e0
Added to database: 07/13/2026, 07:51:44 UTC
Last enriched: 07/20/2026, 19:10:47 UTC
Last updated: 08/26/2026, 16:34:50 UTC
Views: 91
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.