CVE-2025-68656: CWE-416: Use After Free in espressif esp-usb
Espressif ESP-IDF USB Host HID (Human Interface Device) Driver allows access to HID devices. Prior to 1.1.0, usb_class_request_get_descriptor() frees and reallocates hid_device->ctrl_xfer when an oversized descriptor is requested but continues to use the stale local pointer, leading to an immediate use-after-free when processing attacker-controlled Report Descriptor lengths. This vulnerability is fixed in 1.1.0.
AI Analysis
Technical Summary
CVE-2025-68656 is a use-after-free vulnerability identified in the Espressif ESP-IDF USB Host HID driver component (esp-usb) before version 1.1.0. The vulnerability arises in the function usb_class_request_get_descriptor(), which handles requests for HID Report Descriptors from connected USB devices. When an attacker-controlled oversized descriptor length is requested, the function frees and reallocates the memory buffer (hid_device->ctrl_xfer) but continues to use a stale pointer referencing the freed memory. This results in an immediate use-after-free condition, which can lead to memory corruption, arbitrary code execution, or denial of service on the affected device. Exploitation does not require privileges or user interaction but does require access to the USB host interface, which may be local or network-exposed in some IoT deployments. The vulnerability is categorized under CWE-416 (Use After Free) and has a CVSS v3.1 base score of 6.8, indicating medium severity with high impact on confidentiality, integrity, and availability. No known exploits are currently reported in the wild. The issue is resolved in esp-usb version 1.1.0 by correcting the pointer handling logic to avoid use of freed memory. Espressif ESP-IDF is widely used in embedded and IoT devices, making this vulnerability relevant to any organization deploying such devices with vulnerable firmware versions.
Potential Impact
For European organizations, the impact of CVE-2025-68656 depends on the deployment scale of Espressif-based devices using vulnerable esp-usb versions. Exploitation can lead to full compromise of affected devices, including execution of arbitrary code, data leakage, or denial of service. This is particularly critical for industrial IoT, smart building controls, and embedded systems in critical infrastructure that rely on Espressif chips for USB HID device interactions. Compromised devices could serve as entry points for lateral movement within networks or disrupt operational technology environments. The medium CVSS score reflects that while exploitation requires physical or network access to the USB host interface, the consequences of a successful attack are severe. European sectors with extensive IoT adoption, such as manufacturing, energy, and smart city deployments, face increased risk. Additionally, supply chain devices incorporating Espressif components may propagate vulnerabilities across multiple organizations.
Mitigation Recommendations
1. Upgrade all Espressif ESP-IDF esp-usb components to version 1.1.0 or later to apply the official fix. 2. Implement strict USB device filtering policies on endpoints and embedded systems to restrict unauthorized or untrusted USB devices. 3. Monitor USB host interfaces for anomalous HID descriptor requests or unexpected device behavior indicative of exploitation attempts. 4. For network-exposed USB interfaces (e.g., USB over IP), restrict access using network segmentation and strong authentication controls. 5. Conduct firmware inventory and vulnerability scanning to identify devices running vulnerable esp-usb versions. 6. Employ endpoint detection and response (EDR) solutions capable of detecting memory corruption or exploitation behaviors related to use-after-free vulnerabilities. 7. Educate operational technology and IoT device administrators on the risks of USB-based attacks and the importance of timely patching.
Affected Countries
Germany, France, Netherlands, Italy, United Kingdom, Sweden
CVE-2025-68656: CWE-416: Use After Free in espressif esp-usb
Description
Espressif ESP-IDF USB Host HID (Human Interface Device) Driver allows access to HID devices. Prior to 1.1.0, usb_class_request_get_descriptor() frees and reallocates hid_device->ctrl_xfer when an oversized descriptor is requested but continues to use the stale local pointer, leading to an immediate use-after-free when processing attacker-controlled Report Descriptor lengths. This vulnerability is fixed in 1.1.0.
AI-Powered Analysis
Technical Analysis
CVE-2025-68656 is a use-after-free vulnerability identified in the Espressif ESP-IDF USB Host HID driver component (esp-usb) before version 1.1.0. The vulnerability arises in the function usb_class_request_get_descriptor(), which handles requests for HID Report Descriptors from connected USB devices. When an attacker-controlled oversized descriptor length is requested, the function frees and reallocates the memory buffer (hid_device->ctrl_xfer) but continues to use a stale pointer referencing the freed memory. This results in an immediate use-after-free condition, which can lead to memory corruption, arbitrary code execution, or denial of service on the affected device. Exploitation does not require privileges or user interaction but does require access to the USB host interface, which may be local or network-exposed in some IoT deployments. The vulnerability is categorized under CWE-416 (Use After Free) and has a CVSS v3.1 base score of 6.8, indicating medium severity with high impact on confidentiality, integrity, and availability. No known exploits are currently reported in the wild. The issue is resolved in esp-usb version 1.1.0 by correcting the pointer handling logic to avoid use of freed memory. Espressif ESP-IDF is widely used in embedded and IoT devices, making this vulnerability relevant to any organization deploying such devices with vulnerable firmware versions.
Potential Impact
For European organizations, the impact of CVE-2025-68656 depends on the deployment scale of Espressif-based devices using vulnerable esp-usb versions. Exploitation can lead to full compromise of affected devices, including execution of arbitrary code, data leakage, or denial of service. This is particularly critical for industrial IoT, smart building controls, and embedded systems in critical infrastructure that rely on Espressif chips for USB HID device interactions. Compromised devices could serve as entry points for lateral movement within networks or disrupt operational technology environments. The medium CVSS score reflects that while exploitation requires physical or network access to the USB host interface, the consequences of a successful attack are severe. European sectors with extensive IoT adoption, such as manufacturing, energy, and smart city deployments, face increased risk. Additionally, supply chain devices incorporating Espressif components may propagate vulnerabilities across multiple organizations.
Mitigation Recommendations
1. Upgrade all Espressif ESP-IDF esp-usb components to version 1.1.0 or later to apply the official fix. 2. Implement strict USB device filtering policies on endpoints and embedded systems to restrict unauthorized or untrusted USB devices. 3. Monitor USB host interfaces for anomalous HID descriptor requests or unexpected device behavior indicative of exploitation attempts. 4. For network-exposed USB interfaces (e.g., USB over IP), restrict access using network segmentation and strong authentication controls. 5. Conduct firmware inventory and vulnerability scanning to identify devices running vulnerable esp-usb versions. 6. Employ endpoint detection and response (EDR) solutions capable of detecting memory corruption or exploitation behaviors related to use-after-free vulnerabilities. 7. Educate operational technology and IoT device administrators on the risks of USB-based attacks and the importance of timely patching.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-12-22T17:55:15.945Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 696531a5da2266e838e9c377
Added to database: 1/12/2026, 5:38:45 PM
Last enriched: 1/12/2026, 5:53:18 PM
Last updated: 1/13/2026, 12:27:09 AM
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-22214: CWE-121 Stack-based Buffer Overflow in RIOT RIOT OS
MediumCVE-2026-22213: CWE-121 Stack-based Buffer Overflow in RIOT RIOT OS
LowCVE-2024-58340: CWE-1333 Inefficient Regular Expression Complexity in LangChain AI LangChain
HighCVE-2024-58339: CWE-770 Allocation of Resources Without Limits or Throttling in run-llama llama_index
HighCVE-2024-14021: CWE-502 Deserialization of Untrusted Data in run-llama llama_index
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.