CVE-2026-12051 NULL pointer dereference in USB DFU device_next download handler (handle_download)

Medium 4.6 Published Updated

A USB host can crash a Zephyr-based device by sending a zero-length DFU download request, causing a denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-12051?

CVE-2026-12051 is a medium-severity vulnerability in zephyrproject zephyr, published on 11 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

The USB DFU class implementation in Zephyr's new (experimental) device_next USB device stack contains a NULL pointer dereference in handle_download() (subsys/usb/device_next/class/usbd_dfu.c). The handler computes MIN(setup->wLength, buf->len) and passes buf->data to the image write callback without checking that the buf net_buf pointer is non-NULL.

The handler is reached over the USB control endpoint, driven by the USB host. For a DFU_DNLOAD (download) request with no Data OUT stage — notably the zero-length terminating download that the DFU protocol uses to end a firmware transfer — the USB core invokes the class handler with a NULL buffer. After the device has been advanced to the DFU_DNLOAD_IDLE state (by sending one valid download block and a GET_STATUS), a zero-length DFU_DNLOAD reaches handle_download() with buf == NULL, dereferencing it.

The result is a NULL+offset read that triggers a fatal CPU fault, i.e. a denial of service (device crash/reset). The attacker is whatever controls the USB host the device is attached to; DFU download support must be enabled with a registered image. There is no memory corruption or information disclosure — impact is limited to availability. The fix adds an explicit if (buf != NULL) guard so the callback receives a zero-length, NULL-data transfer instead of crashing.

Weakness: CWE-476

Which versions are affected by CVE-2026-12051?

How do I fix CVE-2026-12051?

No fix has been published for CVE-2026-12051 yet. Limit exposure of the affected software until one is available.

Is CVE-2026-12051 being exploited?

There is no known exploitation of CVE-2026-12051 in the wild and no public exploit code.

Sources

Also known as GHSA-vhvq-q6rw-jvm4.

Is CVE-2026-12051 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free