Espressif USB Host HID Driver Use-After-Free Vulnerability Allowing Memory Corruption

Vulnerability

A use-after-free vulnerability has been identified in the Espressif USB Host HID driver, specifically in versions prior to 1.1.0. The issue arises in the function 'usb_class_request_get_descriptor()', which improperly handles oversized HID Report Descriptors. When such a descriptor is requested, the function frees and reallocates the control transfer buffer but continues to use the old pointer, leading to a use-after-free condition. This flaw can be exploited by an attacker to overwrite freed memory, potentially causing arbitrary memory corruption and allowing code execution.

Impact

Exploitation of this vulnerability can lead to arbitrary memory corruption in the USB host task, with the possibility of executing arbitrary code.

Reproduction

The vulnerability can be reproduced by connecting a crafted HID device that advertises an excessively large Report Descriptor length. During the enumeration process, the host will request the descriptor using the inflated length, triggering the use-after-free condition. This can be automated with a test case that mocks a HID device with a large report descriptor, such as 32KB.

Remediation

Users can upgrade to Espressif USB Host HID driver version 1.1.0 or later, where this vulnerability has been fixed.

Added: Jan 12, 2026, 6:23 PM
Updated: Jan 12, 2026, 6:23 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
4.3
remediation
7.7
relevance
2.0
threat
4.8
urgency
2.9
incentive
0.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.