Skip to main content

Zephyr RTOS CVE-2026-10643

HIGH
Out-of-bounds Write (CWE-787)
2026-06-27 zephyr
7.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Run unprivileged userspace thread (CONFIG_USERSPACE)
  2. Delivery
    Open UDP socket with IP_PKTINFO
  3. Exploit
    Call recvmsg() with undersized control buffer
  4. Execution
    Inbound datagram triggers insert_pktinfo()
  5. Persist
    Fixed-size cmsg header written past kernel-heap buffer
  6. Impact
    Groom heap to escalate corruption

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a Zephyr build in the affected range (v3.6.0-v4.4.0) with the networking socket layer enabled AND an application that opens an IP/UDP socket with one of the ancillary options that reach insert_pktinfo() - IP_PKTINFO or IPV6_RECVPKTINFO (or hoplimit / SO_TIMESTAMPING) - and then calls recvmsg() with a control buffer sized in the under-checked window (e.g. 16-27 bytes for IPv4 IP_PKTINFO on a 64-bit target). A datagram must actually be received to trigger the write. Kernel-heap corruption (the serious case) additionally requires CONFIG_USERSPACE, under which an unprivileged userspace thread is sufficient (PR:L); in supervisor-only mode the overflow only corrupts the caller's own buffer, materially limiting impact. Limiting factors: exploitation is local (AV:L) not remote, depends on the application deliberately using ancillary data with an undersized buffer, the overflow is a fixed ~12-byte header write (not attacker-length-controlled) with only the ipi_addr destination-IP bytes influenced by packet contents, and it does not affect builds that never enable these socket options.

Impact

The signals are internally consistent and point to a real but bounded, locally-scoped issue rather than a mass-exploitation emergency. The CVSS 3.1 vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (base 7.8 High) correctly reflects local attack vector with low privileges required, matching the description that exploitation comes from an unprivileged userspace thread on a CONFIG_USERSPACE build. EPSS is very low (0.12%, 2nd percentile) and CISA SSVC records Exploitation: none, Automatable: no, Technical Impact: partial - all aligned: this is not remotely reachable, not internet-facing, and not something a worm can spray. The write is fixed-size (about one 12-byte cmsg header past the buffer) and only partially attacker-influenced (the destination IP in ipi_addr comes from the received packet), which constrains how much a kernel-heap corruption can be shaped, consistent with SSVC's 'partial' technical impact even though CVSS marks C/I/A High. No KEV listing and no POC are indicated, so this should be prioritized as a standard patch-in-next-cycle item for affected embedded fleets, with urgency rising only where untrusted code runs as unprivileged userspace threads on a networked device.

Exploit ScenarioDerived

On a networked Zephyr device built with CONFIG_USERSPACE, an attacker who can run (or coerce) an unprivileged userspace thread opens a UDP socket with IP_PKTINFO enabled and calls recvmsg() with a deliberately undersized (e.g. 16-27 byte) control buffer; when any datagram arrives, insert_pktinfo() writes about 12 bytes past the kernel-heap copy, corrupting adjacent heap metadata. With repeated triggering and heap grooming - partly steering the overwritten destination-IP bytes via crafted inbound packets - this local, low-privilege memory corruption can be escalated toward kernel-context compromise; no public POC is identified at time of analysis, and the local attack vector with low complexity (AC:L) keeps the trigger reliable but not remotely reachable.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv7 – Jul 06, 2026

Out-of-bounds heap write in the Zephyr RTOS IP socket stack (recvmsg/insert_pktinfo) lets an unprivileged local userspace thread corrupt kernel-heap memory on builds using CONFIG_USERSPACE. Affecting Zephyr v3.6.0 through v4.4.0, the flaw is triggered when an application calls recvmsg() with an undersized ancillary (msg_control) buffer on a UDP/IP socket that has IP_PKTINFO/IPV6_RECVPKTINFO (or hoplimit/timestamping) enabled and a datagram arrives. There is no public exploit identified at time of analysis and EPSS is low (0.12%), but the memory-corruption primitive gives full C/I/A impact locally.

Earlier versions of this analysis (6)
v6 Jul 06, 2026 - 21:46 cvss changed CVSS 7.8

Out-of-bounds heap write in Zephyr RTOS (v3.6.0 through v4.4.0) occurs in the IP socket recvmsg() ancillary-data path when insert_pktinfo() validates the user's msg_control buffer against only the payload length and omits the aligned cmsg header, letting an undersized buffer pass the guard and take a fixed ~12-byte overwrite past its end. On builds with CONFIG_USERSPACE the recvmsg verifier stages the control buffer in a kernel-heap copy sized to msg_controllen, so an unprivileged userspace thread can corrupt kernel heap memory; in supervisor mode the caller's own buffer is corrupted. No public exploit identified at time of analysis, EPSS is low (0.12%, 2nd percentile), and CISA SSVC records no observed exploitation.

v5 Jul 06, 2026 - 21:46 cvss changed CVSS 7.8

Out-of-bounds kernel-heap write in Zephyr RTOS (v3.6.0-v4.4.0) occurs when its IP socket recvmsg() implementation copies ancillary control data into an undersized msg_control buffer, letting a local unprivileged userspace thread (under CONFIG_USERSPACE) corrupt kernel heap memory. The flaw stems from insert_pktinfo() validating only the payload length and omitting the cmsg header size, so a control buffer in the 16-27 byte window for IPv4 IP_PKTINFO on a 64-bit target passes the guard yet triggers a fixed ~12-byte overflow. There is no public exploit identified at time of analysis, EPSS is low (0.12%), and CISA SSVC rates exploitation as none; real-world risk is bounded by the need for local code execution plus a specific application usage pattern.

v4 Jul 06, 2026 - 21:46 cvss changed CVSS 7.8

Out-of-bounds heap write in Zephyr RTOS (v3.6.0 through v4.4.0) lets an unprivileged local thread corrupt kernel memory through the IP socket recvmsg() path. The insert_pktinfo() routine sized its control-buffer capacity check against only the ancillary payload length while later writing an aligned cmsg header plus payload, so an undersized msg_control buffer passes validation and triggers a fixed ~12-byte overflow past the buffer end. Under CONFIG_USERSPACE the overflow lands in a kernel-heap copy, making it reachable across the user/kernel boundary; there is no public exploit identified at time of analysis and EPSS is low (0.12%).

v3 Jul 06, 2026 - 21:45 cvss changed CVSS 7.8

Out-of-bounds heap write in the Zephyr RTOS IP socket stack (v3.6.0 through v4.4.0) lets a local unprivileged userspace thread corrupt kernel memory when receiving datagrams via recvmsg(). The insert_pktinfo() routine sized its control-buffer capacity check on the payload length alone, omitting the aligned cmsg header, so an undersized ancillary buffer passes validation and triggers a fixed ~12-byte overflow. No public exploit is identified at time of analysis and EPSS is low (0.12%), but the flaw is a genuine memory-corruption primitive reachable from unprivileged code under CONFIG_USERSPACE.

v2 Jul 06, 2026 - 21:44 cvss changed CVSS 7.8

Out-of-bounds heap write in Zephyr RTOS (v3.6.0 through v4.4.0) lets an unprivileged userspace thread corrupt kernel memory by calling recvmsg() with an undersized ancillary (msg_control) buffer on a UDP/IP socket that has IP_PKTINFO, IPV6_RECVPKTINFO, hoplimit, or timestamping enabled. The insert_pktinfo() capacity check compared the buffer length against only the payload length and omitted the aligned cmsg header, so a control buffer in the under-checked window (e.g. 16-27 bytes for IPv4 IP_PKTINFO on a 64-bit target) passes validation yet triggers a fixed-size write of up to ~12 header bytes past the buffer end. There is no public exploit identified at time of analysis; EPSS is low (0.12%, 2nd percentile) and the flaw is not in CISA KEV.

v1 Jun 27, 2026 - 23:50 CVSS 8.7

Out-of-bounds heap write in the Zephyr RTOS IP socket stack (recvmsg/insert_pktinfo) lets an unprivileged local userspace thread corrupt kernel-heap memory on builds with CONFIG_USERSPACE enabled. Affecting versions v3.6.0 through v4.4.0, the flaw is triggered when an application calls recvmsg() with an undersized ancillary (control) buffer on a UDP/IP socket that has IP_PKTINFO/IPV6_RECVPKTINFO (or hoplimit/timestamping) enabled and a datagram arrives, overwriting up to one cmsg header (~12 bytes) past the buffer. No public exploit identified at time of analysis, and it is not listed in CISA KEV; a vendor commit fixes the capacity check.

RemediationAI

Upstream fix available (PR/commit); a released patched version is not independently confirmed from the provided data - apply commit 01fe77b2ec3885583f709a17c5203ce02bd77012 (https://github.com/zephyrproject-rtos/zephyr/commit/01fe77b2ec3885583f709a17c5203ce02bd77012) or the corresponding maintenance release for your branch, which corrects the capacity check to use NET_CMSG_SPACE(pktinfo_len) and returns -ENOMEM on undersized buffers. Because Zephyr is compiled into device firmware, remediation means rebuilding and reflashing affected images rather than package updates. Where an immediate rebuild is not possible, compensating controls include disabling the ancillary-data socket options that reach the vulnerable path - do not enable IP_PKTINFO/IPV6_RECVPKTINFO, IP hoplimit reporting, or SO_TIMESTAMPING on IP sockets (trade-off: applications that rely on knowing the datagram's destination interface/address lose that metadata) - and, on CONFIG_USERSPACE builds, restricting which threads run in user mode and can invoke recvmsg() so untrusted code cannot reach the primitive; auditing application code to ensure recvmsg() is always called with a control buffer of at least NET_CMSG_SPACE() bytes also avoids triggering the flaw. Cross-reference the analysis at https://vuldb.com/vuln/374512.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Zephyr is a widely-used real-time operating system for resource-constrained IoT and embedded devices (cpe:2.3:a:zephyrproject:zephyr). The bug lives in subsys/net/lib/sockets/sockets_inet.c, in insert_pktinfo(), which builds a POSIX-style control message (cmsghdr + payload) for socket ancillary data such as IP_PKTINFO. The root cause is CWE-787 (out-of-bounds write): the capacity check compared the user buffer only against the raw payload length (msg_controllen < pktinfo_len) and ignored the aligned cmsg header. Because a full IPv4 IP_PKTINFO element occupies 28 bytes on a 64-bit target (aligned header plus aligned data) while the check only required room for the payload, a buffer sized in the 16-27 byte window passes the guard but the write runs off the end. Under CONFIG_USERSPACE the recvmsg verifier allocates a kernel-heap copy of the control buffer sized to msg_controllen, so the overflow lands in kernel heap rather than user memory. The fix switches the check to NET_CMSG_SPACE(pktinfo_len), which accounts for aligned header plus aligned data, and returns -ENOMEM when the buffer is too small; a companion fix corrects update_msg_controllen() to accumulate NET_ALIGN_H(cmsg_len).

Know when Zephyr gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (zephyr) PRIMARY HIGH
NVD 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.7 HIGH

Local trigger from an unprivileged userspace thread (AV:L, PR:L) with a reliable fixed-size heap overflow (AC:L) that corrupts kernel memory, yielding high C/I/A potential without scope change.

3.1 AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:L/SI:H/SA:H

Primary rating from Vendor (zephyr).

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

7
Analysis Updated
Jul 06, 2026 - 21:47 vuln.today
v7 - CVSS changed
Analysis Updated
Jul 06, 2026 - 21:46 vuln.today
v6 - CVSS changed
Analysis Updated
Jul 06, 2026 - 21:46 vuln.today
v5 - CVSS changed
Analysis Updated
Jul 06, 2026 - 21:46 vuln.today
v4 - CVSS changed
Analysis Updated
Jul 06, 2026 - 21:45 vuln.today
v3 - CVSS changed
Analysis Updated
Jul 06, 2026 - 21:44 vuln.today
v2 - CVSS changed
CVSS changed
Jul 06, 2026 - 19:52 NVD
8.7 (HIGH) 7.8 (HIGH)

DescriptionNVD

Zephyr's IP socket recvmsg() implementation (subsys/net/lib/sockets/sockets_inet.c, insert_pktinfo()) validated the user-supplied ancillary (msg_control) buffer using only the payload length (msg-msg_controllen < pktinfo_len) before writing a full control message consisting of an aligned cmsg header plus the payload. Because the check omitted the cmsg header size, a control buffer whose length falls in the under-checked window (e.g. 16-27 bytes for IPv4 IP_PKTINFO on a 64-bit target, where a single element actually occupies 28 bytes) passes the guard yet causes a fixed-size out-of-bounds write of up to one cmsg header (~12 bytes) past the end of the buffer. Under CONFIG_USERSPACE the recvmsg verifier allocates a kernel-heap copy of the control buffer sized to msg_controllen and runs the implementation against it, so the overflow corrupts kernel heap memory and is triggerable from an unprivileged userspace thread; in supervisor mode it corrupts the caller's buffer. The path is reachable on a UDP/IP socket with IP_PKTINFO/IPV6_RECVPKTINFO (or hoplimit/timestamping) enabled when the application calls recvmsg() with an undersized control buffer and a datagram is received; part of the overwritten bytes (the destination IP in ipi_addr) is influenced by the received packet. The fix makes the capacity check use NET_CMSG_SPACE(pktinfo_len) (aligned header + aligned data) and returns -ENOMEM when the buffer is too small. Affected: v3.6.0 through v4.4.0.

Executive ViewAI

Why It Matters

A memory corruption vulnerability in Zephyr RTOS versions 3.6.0 through 4.4.0 enables local attackers to corrupt kernel memory through the UDP/IP socket stack, potentially compromising embedded systems and IoT devices. No public exploit identified at time of analysis; however, the vulnerability grants full local compromise if successfully exploited, and organizations deploying affected versions should prioritize patching. The attack requires local execution capabilities and specific socket configurations, limiting immediate widespread risk but warranting prompt security updates.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Medium
widely-used embedded RTOS, but only network-socket builds using ancillary data affected
Social Media
4
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Affected Products (CPE)NVD

cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2026-1678 CRITICAL POC
9.8 Mar 05

An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy