Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-12052: bounds in zephyrproject zephyr

0
Medium
VulnerabilityCVE-2026-12052cvecve-2026-12052
Published: 08/11/2026 (08/11/2026, 05:51:40 UTC)
Source: CVE Database V5
Vendor/Project: zephyrproject
Product: zephyr

Description

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.

CVSS v3.1

Score 5.2medium

Attack Vector
Physical
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
High
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

Affected software

GitHub Actionsmore threats →cve
zephyr
pkg:github/zephyr
Affected versions
>=4.0.0 <4.4.2

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

AILast updated: 08/11/2026, 06:15:33 UTC

Technical Analysis

The vulnerability exists in the usbd_cdc_ncm_cth handler in Zephyr's USB CDC NCM class implementation. It builds fixed-size responses for GET_NTB_PARAMETERS and GET_NTB_INPUT_SIZE requests and copies the entire structure into the control DATA IN buffer using net_buf_add_mem without checking the host-supplied wLength. The buffer is allocated exactly to wLength bytes, so if wLength is smaller than the response size, this results in an out-of-bounds write of up to 27 bytes past the buffer. The overflow corrupts adjacent memory in the shared udc_ep_pool, causing memory corruption and denial of service of the USB stack. The overflow length is bounded and the data written is fixed device constants, so there is no information disclosure. The vulnerability can be triggered by any host or USB interposer without authentication. The fix involves clamping the copy size to the minimum of the response size and wLength, consistent with the CDC ACM handler.

Potential Impact

This vulnerability allows an unauthenticated USB host to cause memory corruption in the Zephyr USB stack, leading to denial of service of the USB device's USB stack. The out-of-bounds write is limited to 27 bytes and writes fixed device constants, so it does not lead to information disclosure. There is no indication of remote code execution or privilege escalation. The impact is primarily denial of service.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The described fix clamps the copy size to the minimum of the response size and the host-supplied wLength, preventing the overflow. Until an official fix is available, avoid connecting Zephyr devices running affected versions to untrusted USB hosts or USB interposers that could send malformed CDC NCM requests.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
zephyr
Date Reserved
2026-06-11T22:20:55.999Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a7ab9aabf8831d539367f95

Added to database: 08/11/2026, 05:56:58 UTC

Last enriched: 08/11/2026, 06:15:33 UTC

Last updated: 08/11/2026, 17:12:19 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses