Skip to main content

Zephyr RTOS CVE-2026-12052

| EUVDEUVD-2026-55967 MEDIUM
Out-of-bounds Write (CWE-787)
2026-08-11 zephyr
5.2
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

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

  1. Access
    Gain physical USB access to Zephyr device
  2. Delivery
    Enumerate device as USB host
  3. Exploit
    Send GET_NTB_PARAMETERS SETUP request with wLength=1
  4. Execution
    Handler copies 28-byte struct into 1-byte buffer
  5. Persist
    Overwrite 27 bytes of udc_ep_pool heap metadata
  6. Impact
    Crash USB stack (denial of service)

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

Physical USB connection between an attacker-controlled USB host (or USB interposer) and the target Zephyr device is required - there is no network-reachable attack surface. The device firmware must be compiled with both the device_next USB stack and the CDC NCM class enabled; this is an opt-in build configuration controlled by Kconfig, not present in all Zephyr images. Once USB enumeration occurs, no authentication or credentials are required - the wLength field is sourced from the USB SETUP packet and processed before any class-level gating. The written overflow content is fixed device constants (not attacker-supplied), which prevents arbitrary memory write exploitation and confines impact to heap metadata corruption and USB stack DoS. Devices built without CDC NCM support, or using the legacy USB device stack rather than device_next, are not affected by this vulnerability.

Impact

The CVSS 5.2 score with AV:P accurately reflects the practical attack surface - physical USB connection to the target device is mandatory, which is a meaningful barrier in most deployment models. EPSS data was not provided in the input and cannot be inferred. This CVE is not listed in CISA KEV, and no public exploit code has been identified at time of analysis. The overflow is bounded at a maximum of 27 bytes and writes only fixed, attacker-uncontrollable device constants, which substantially constrains exploitability beyond DoS; achieving reliable code execution from this primitive would require deep knowledge of the heap layout. The CDC NCM class is an opt-in build-time component of the device_next stack, not universally present in all Zephyr firmware images, which meaningfully narrows the exposed population beyond what the wildcard CPE version range implies. CVSS I:L appears slightly generous given that written content is not attacker-controlled, but heap metadata corruption does represent a real, if bounded, integrity impact. Real-world priority is moderate: the physical access prerequisite reduces urgency for most deployments, but USB peripheral products where untrusted parties may connect a host - public kiosks, industrial HMIs, shared lab equipment - warrant prompt patching.

Exploit ScenarioDerived

An attacker with physical access to a deployed Zephyr device - using a laptop acting as a USB host, a commercial USB interposer, or a crafted USB peripheral - enumerates the device and issues a standard CDC NCM GET_NTB_PARAMETERS control request with the wLength field in the SETUP packet set to 1. The usbd_cdc_ncm_cth handler allocates a 1-byte response buffer and then copies the full 28-byte ntb_parameters structure into it, overwriting 27 bytes of adjacent udc_ep_pool metadata and crashing the device USB stack. No public exploit code has been identified, but the attack requires only standard USB host capabilities and knowledge of CDC NCM protocol structure.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 11, 2026

Out-of-bounds heap write in Zephyr RTOS's USB device-next CDC NCM class handler allows any physical USB host to corrupt the device's shared network buffer pool by issuing standard GET_NTB_PARAMETERS or GET_NTB_INPUT_SIZE control requests with a wLength field smaller than the response structure size. The overflow is bounded at up to 27 bytes and writes only fixed device constants, making its primary impact denial of service of the USB stack rather than arbitrary code execution. No public exploit has been identified at time of analysis, and the vulnerability is not listed in CISA KEV; however, exploitation requires only physical USB access to a device built with the opt-in device_next stack and CDC NCM class.

RemediationAI

The upstream fix is available as commit c49b758d87914e185ff611e93473bf8ec84a378a in the Zephyr project repository (https://github.com/zephyrproject-rtos/zephyr/commit/c49b758d87914e185ff611e93473bf8ec84a378a); the patch adds MIN(sizeof(ntb_params), setup->wLength) and MIN(sizeof(input_size), setup->wLength) clamping to both affected handlers, matching the pattern already used in the CDC ACM handler. A specific tagged release version containing this fix was not confirmed from the available input - this is an upstream commit only; project teams should consult the Zephyr release schedule and monitor the advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-vr4p-6rg5-qgpx for an official patched release. As a compensating control where immediate patching is not feasible, disabling CDC NCM class support at build time by removing or disabling the relevant Kconfig option eliminates the vulnerable code path entirely, with the trade-off of losing Ethernet-over-USB (NCM) functionality. Where build-time changes are impractical, restricting physical USB port access on deployed devices (port blockers, physical enclosures, access control policies) limits exposure but does not address the underlying flaw.

Affected VersionsENISA

Zephyr 4.0.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

The vulnerability exists in usbd_cdc_ncm_cth (subsys/usb/device_next/class/usbd_cdc_ncm.c), the control-to-host request handler for Zephyr's next-generation USB device stack. CWE-787 (Out-of-bounds Write) describes the root cause: the USB stack allocates the control DATA IN buffer with exactly wLength bytes sourced from the USB SETUP packet (usbd_ep_ctrl_data_in_alloc → udc_ctrl_data_alloc → net_buf_alloc_len(&udc_ep_pool, wLength)), while the handler unconditionally copies the full response struct - 28 bytes for ntb_parameters (GET_NTB_PARAMETERS) or 8 bytes for ntb_input_size (GET_NTB_INPUT_SIZE) - via net_buf_add_mem. The only guard, __ASSERT_NO_MSG, is compiled out in production builds. A host sending wLength=1 causes memcpy to write up to 27 bytes past the end of the allocated pool buffer, corrupting adjacent allocations and metadata in the shared udc_ep_pool. The wLength field originates directly from the USB SETUP packet, so any enumerating USB host controls this value with no preconditions. The affected product is identified by CPE cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*.

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

Physical USB connection mandatory (AV:P); no credentials needed (PR:N); overflow writes fixed constants limiting integrity to L; reliably crashes USB stack (A:H).

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

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

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

DescriptionCVE.org

The USB device-side CDC NCM class control-to-host handler usbd_cdc_ncm_cth in subsys/usb/device_next/class/usbd_cdc_ncm.c builds a fixed-size response for the GET_NTB_PARAMETERS (28-byte struct ntb_parameters) and GET_NTB_INPUT_SIZE (8-byte struct ntb_input_size) class requests and copies the whole structure into the control DATA IN buffer with net_buf_add_mem(buf, ..., sizeof(...)), ignoring the host-supplied wLength.

The control DATA IN buffer is allocated by the USB stack with a capacity of exactly wLength bytes (usbd_ep_ctrl_data_in_alloc -> udc_ctrl_data_alloc -> net_buf_alloc_len(&udc_ep_pool, wLength); no round-up is applied for the IN endpoint). Because net_buf_add_mem/net_buf_simple_add only bounds the copy with an __ASSERT_NO_MSG, which is compiled out in production builds, a host that issues one of these standard CDC NCM control requests with a wLength smaller than the response structure (e.g. wLength = 1) causes the handler to memcpy up to 27 bytes past the end of the allocated pool buffer.

The request fields come straight from the USB SETUP packet, so any host (or USB interposer) the Zephyr device enumerates against can trigger the overflow with no authentication once an image built with the device_next USB stack and the CDC NCM class is connected. The out-of-bounds write corrupts adjacent allocations and metadata in the shared udc_ep_pool, primarily causing memory corruption and denial of service of the USB stack; the overflow length is bounded (<= 27 bytes) and the written content is fixed device constants, and the bug reads nothing back so there is no information disclosure. The fix clamps the copy with MIN(sizeof(...), setup->wLength), matching the existing CDC ACM handler.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Low
niche embedded RTOS for constrained IoT and industrial devices
Data Quality
6 sources
Confidence: High

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
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.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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