Skip to main content

Zephyr RTOS CVE-2026-12234

| EUVDEUVD-2026-57069 HIGH
Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367)
2026-08-12 zephyr
7.8
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

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

  1. Recon
    Gain unprivileged local thread execution on Zephyr device
  2. Delivery
    Spawn cooperating race thread in same address space
  3. Exploit
    Invoke zsock_sendmsg or zsock_recvmsg with crafted net_msghdr
  4. Install
    Race thread inflates msg_iovlen between kernel sizing read and loop bound
  5. C2
    Copy loop iterates past heap shadow buffer boundary
  6. Execute
    Write attacker-controlled iov_base/iov_len into adjacent kernel heap
  7. Impact
    Leverage heap corruption for privilege escalation or kernel panic

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
Exploitation Conditions

CONFIG_USERSPACE must be enabled in the Zephyr build configuration - this is the mandatory gating condition, as the vulnerability exists entirely within the z_vrfy_* syscall verifier layer that is only compiled in when this option is set. The zsock_sendmsg and zsock_recvmsg syscalls must be available and permitted to the calling thread. The attacker must have the ability to execute unprivileged code on the target device and to spawn or coordinate with a cooperating second thread within the same process and memory domain, as the exploit depends on a thread race to modify msg_iovlen between two kernel reads - a single-threaded attacker cannot trigger the vulnerability. Exploitation is further constrained by AC:H: the race window is narrow and hardware-platform-dependent, requiring precise thread scheduling behavior that may vary significantly across Zephyr target architectures (ARM Cortex-M, RISC-V, x86 sim, etc.) and scheduler configurations. The attacker must already hold a running thread on the device (PR:L per CVSS); remote unauthenticated network exploitation is not possible - this is strictly a local privilege-escalation or denial-of-service primitive that cannot be triggered by external network input alone.

Impact

The CVSS 3.1 score of 7.8 (AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H) accurately captures the tension between difficult exploitation and catastrophic impact: AC:H reflects the genuine timing constraint of winning the race on real hardware, while S:C with full C/I/A acknowledges that a successful exploit crosses the user-to-kernel privilege boundary with unconstrained kernel heap control. EPSS data was not supplied in the available intelligence, limiting probabilistic exploitation forecasting; the CVE is not listed in the CISA KEV catalog and no public proof-of-concept has been identified, so confirmed active exploitation cannot be asserted. SSVC dimensions indicate: exploitation status is 'none' (no public weaponization), the attack is not automatable (requires local code execution, thread co-scheduling, and hardware-dependent race timing), and technical impact is 'total' if the race is won. Despite the high attack complexity, the severity for any Zephyr deployment with CONFIG_USERSPACE enabled warrants urgent attention - kernel heap corruption primitives of this class (heap OOB write with attacker-controlled content) have historically been converted into reliable exploits by skilled researchers given sufficient platform access and scheduling profiling time, even when initial win rates are low. The absence of EPSS and KEV data means risk must be assessed primarily from the CVSS vector and the nature of the primitive itself; the high-complexity bar meaningfully reduces near-term mass exploitation risk but does not eliminate targeted exploitation risk against higher-value embedded targets.

Exploit ScenarioDerived

An attacker with the ability to execute unprivileged code on a Zephyr device built with CONFIG_USERSPACE enabled spawns two cooperating threads in the same address space. The first thread calls zsock_sendmsg() with a crafted net_msghdr where msg_iovlen is initialized to a small, allocation-safe value; the second thread spins racing to inflate msg_iovlen in the narrow window between the kernel's buffer-sizing read and its copy-loop bound check. If the race is won, the kernel's iovec population loop iterates past the end of its heap-allocated shadow buffer, writing attacker-controlled iov_base and iov_len values into adjacent kernel heap objects, which can then be leveraged for kernel privilege escalation or to induce a kernel panic.

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

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

Alert me

AnalysisAIv1 – Aug 12, 2026

Kernel heap corruption via a double-fetch race condition in Zephyr RTOS's unprivileged socket syscall verifiers allows a local low-privilege attacker to achieve kernel privilege escalation or trigger a kernel denial of service. The flaw exists in z_vrfy_zsock_sendmsg() and z_vrfy_zsock_recvmsg() within subsys/net/lib/sockets/sockets.c, where msg_iovlen is read twice from live user memory - once to size the kernel heap shadow buffer and once as the iovec copy-loop bound - enabling a cooperating attacker thread to inflate the field between those reads and drive an out-of-bounds write into adjacent kernel heap objects. No public exploit has been identified at time of analysis; an upstream patch commit is confirmed available via the Zephyr project security advisory.

RemediationAI

Apply upstream commit 2e0f9cf05be61056ed1a94dab51b832fbad27e2c (https://github.com/zephyrproject-rtos/zephyr/commit/2e0f9cf05be61056ed1a94dab51b832fbad27e2c), which eliminates all double-fetch opportunities in both the sendmsg and recvmsg verifiers by snapshotting the net_msghdr header exactly once before any size calculation and copying each iovec atomically. Track the Zephyr security advisory GHSA-fcp3-vrr2-xfjv for the tagged release incorporating this fix, as the exact patched version number was not confirmed in the available data. If immediate patching is not feasible, the most direct compensating control is to disable CONFIG_USERSPACE in the build configuration, which removes the user/kernel privilege boundary and the z_vrfy_* verifier layer entirely - note that this also eliminates userspace isolation protections project-wide, which may be architecturally unacceptable for multi-tenant or safety-critical deployments. A narrower alternative is to restrict thread permissions for zsock_sendmsg and zsock_recvmsg to only trusted threads via Zephyr's thread permission APIs, reducing the attack surface without disabling the full userspace subsystem, though this does not eliminate risk if any permitted thread is compromised.

Affected VersionsENISA

Zephyr 2.3.0 <4.4.2

Affected Packages

euvd zephyr fix: 4.4.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

Zephyr RTOS (CPE: cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*) is an open-source real-time operating system targeting constrained embedded and IoT devices that exposes a POSIX-like socket API through zsock_sendmsg and zsock_recvmsg syscalls. When CONFIG_USERSPACE is enabled, Zephyr enforces a hardware-backed user/kernel privilege boundary; syscall verifier functions (z_vrfy_*) are responsible for safely copying caller-supplied structures into kernel-controlled memory before the privileged implementation executes. The root cause is CWE-367 (Time-of-Check Time-of-Use): the verifier reads the user-space struct net_msghdr field msg_iovlen once via size_mul_overflow() to size a kernel-heap iovec shadow buffer, then reads the same live user-space field a second time as the loop bound during iovec population. Because the msg pointer still references ordinary user memory rather than the kernel snapshot, a cooperating thread in the same address domain can modify msg_iovlen between these two reads - a classic double-fetch - causing the population loop to iterate past the allocated shadow buffer and write attacker-influenced iov_base/iov_len values into adjacent kernel heap objects. The recvmsg verifier carries the identical defect across both its inbound allocation loop and its result write-back loop. The upstream fix (commit 2e0f9cf) eliminates all live re-reads by snapshotting the full net_msghdr header once with k_usermode_from_copy() before any size arithmetic, and copying each iovec entry atomically via a local stack struct so no field can be raced between check and use.

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 7.8 HIGH
AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Requires local thread execution and a timing race (AV:L, AC:H, PR:L); successful kernel heap corruption crosses the privilege boundary (S:C) yielding full confidentiality, integrity, and availability impact.

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

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

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

DescriptionCVE.org

The userspace syscall verifiers z_vrfy_zsock_sendmsg() and z_vrfy_zsock_recvmsg() in subsys/net/lib/sockets/sockets.c snapshot the caller-supplied struct net_msghdr into a kernel-side copy with k_usermode_from_copy(), but then re-read the still-live user struct for subsequent decisions. The kernel iovec shadow buffer is sized from one read of msg->msg_iovlen, while the population loop is bounded by a second, live read of the same field.

Because msg points into ordinary user memory, a cooperating second thread in the same memory domain can inflate msg->msg_iovlen in the window between the sizing read and the loop test (a classic double-fetch / TOCTOU). The population loop then iterates past the number of net_iovec slots actually allocated, writing attacker-influenced iov_base/iov_len values beyond the end of the kernel-heap shadow buffer. The recvmsg verifier has the same defect on both its inbound and result write-back loops.

The code is reachable from an unprivileged user thread whenever CONFIG_USERSPACE is enabled and the zsock_sendmsg/zsock_recvmsg syscalls are available. A successful race corrupts kernel-managed heap memory across the user-to-kernel privilege boundary, yielding a local privilege-escalation primitive or, at minimum, a kernel-fault denial of service. The fix copies the header once and derives every size, bound, and gate from the snapshot, copying each iovec entry atomically so its base and length can no longer be raced apart.

Executive ViewAI

Why It Matters

Zephyr RTOS systems are vulnerable to local kernel privilege escalation via a double-fetch race condition in socket syscall validation, allowing processes to elevate to kernel-level access or trigger denial of service, with no public exploit identified at time of analysis. This affects embedded and IoT deployments relying on Zephyr, potentially compromising system integrity and availability. With a high severity rating (CVSS 7.8), a vendor patch is available.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
8.0%
Prevalence
Low
specialized embedded IoT RTOS, limited general-enterprise production footprint
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD 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 8.0%
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
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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