Severity by source
AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
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).
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
Lifecycle Timeline
2DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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:*:*:*:*:*:*:*:*.
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.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
Buffer overflow in Zephyr RTOS dns_unpack_name() function causing OOB writes. PoC available.
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
Same weakness CWE-787 – Out-of-bounds Write
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-55967