# CVE-2026-12052: Out-of-bounds write in USB CDC NCM control handler when host wLength is smaller than the response

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.2
- **CVSS:** 5.2 (v3.1, CNA) `CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H`
- **CVSS metrics:** Attack vector: Physical; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.27% (percentile 11, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2026-08-11T05:51:40.540Z
- **Modified:** 2026-11-04T05:18:37.827Z

## Who should check

- Anyone running zephyrproject zephyr \>= 4.0.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2

## 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.

## Affected and fixed versions

- zephyrproject zephyr: \>= 4.0.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2 (cvelist)

## Mitigation

- Upgrade zephyr to 4.4.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-12052. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-12052.md
Affected: zephyrproject zephyr >= 4.0.0, < 4.3.2; >= 4.4.0, < 4.4.2
Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-12052 being exploited?

There is no confirmed exploitation: CVE-2026-12052 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-12052?

Medium: CVSS 5.2 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-12052?

zephyrproject zephyr \>= 4.0.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2.

### Is there a fix for CVE-2026-12052?

Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2. Upgrade zephyr to 4.4.2 or later.

### How do I check if I'm affected by CVE-2026-12052?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-vr4p-6rg5-qgpx>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/c49b758d87914e185ff611e93473bf8ec84a378a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-12052>

HTML: <https://flawdb.com/CVE-2026-12052> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-12052>
