CVE-2025-68657: CWE-415: Double 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, calls to hid_host_device_close() can free the same usb_transfer_t twice. The USB event callback and user code share the hid_iface_t state without locking, so both can tear down a READY interface simultaneously, corrupting heap metadata inside the ESP USB host stack. This vulnerability is fixed in 1.1.0.
AI Analysis
Technical Summary
CVE-2025-68657 is a double free vulnerability identified in the Espressif ESP-IDF USB Host Human Interface Device (HID) driver, specifically in versions prior to 1.1.0. The vulnerability stems from a race condition where both the USB event callback and user code can concurrently invoke hid_host_device_close(), leading to the same usb_transfer_t memory being freed twice. This occurs because the shared hid_iface_t state is accessed without proper synchronization or locking mechanisms, allowing simultaneous teardown of a READY interface. The double free results in heap metadata corruption within the ESP USB host stack, which can cause undefined behavior including crashes, memory corruption, or potentially arbitrary code execution. The vulnerability affects embedded devices using Espressif's USB host stack for HID devices, commonly found in IoT and embedded systems. The CVSS v3.1 score of 6.4 reflects medium severity, with attack vector being physical or local (AV:P), high attack complexity (AC:H), no privileges required (PR:N), and no user interaction (UI:N). The impact covers confidentiality, integrity, and availability, as exploitation could allow attackers to disrupt device operation or manipulate data. The issue was publicly disclosed on January 12, 2026, and fixed in ESP-IDF version 1.1.0. No known exploits have been reported in the wild, but the vulnerability poses a risk to devices that have not been updated. The root cause relates to improper concurrency control (CWE-667) and double free (CWE-415) in the USB host stack implementation.
Potential Impact
For European organizations, the impact of CVE-2025-68657 primarily concerns embedded and IoT devices using Espressif ESP-IDF USB host stacks, especially those interfacing with HID devices. Exploitation could lead to device crashes, denial of service, or potentially arbitrary code execution, compromising device availability and integrity. This could disrupt critical infrastructure, industrial control systems, or consumer IoT deployments. Confidentiality may also be at risk if attackers leverage heap corruption to execute code or access sensitive data. Given the widespread use of Espressif chips in IoT devices, sectors such as manufacturing, smart cities, healthcare, and automotive in Europe could be affected. The requirement for physical or local access to the USB host interface limits remote exploitation but does not eliminate risk in environments where attackers have proximity or insider access. The vulnerability could facilitate lateral movement or persistence in targeted attacks. Organizations relying on Espressif-based devices should assess their exposure and prioritize patching to maintain operational security.
Mitigation Recommendations
1. Upgrade all Espressif ESP-IDF USB Host HID driver instances to version 1.1.0 or later, where the vulnerability is fixed. 2. Implement strict access controls to USB host interfaces on embedded devices to prevent unauthorized physical or logical access. 3. Employ runtime monitoring and anomaly detection on USB host activity to identify unusual device teardown or memory corruption events. 4. For devices that cannot be immediately updated, consider disabling USB host HID functionality if not required. 5. Conduct thorough security audits of IoT and embedded device firmware to identify usage of vulnerable ESP-IDF versions. 6. Enforce network segmentation and physical security controls to limit attacker proximity to vulnerable devices. 7. Collaborate with device manufacturers to ensure timely firmware updates and vulnerability disclosures. 8. Integrate vulnerability management processes that track Espressif component versions and patch status across deployed devices.
Affected Countries
Germany, France, United Kingdom, Italy, Netherlands, Spain, Sweden
CVE-2025-68657: CWE-415: Double 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, calls to hid_host_device_close() can free the same usb_transfer_t twice. The USB event callback and user code share the hid_iface_t state without locking, so both can tear down a READY interface simultaneously, corrupting heap metadata inside the ESP USB host stack. This vulnerability is fixed in 1.1.0.
AI-Powered Analysis
Technical Analysis
CVE-2025-68657 is a double free vulnerability identified in the Espressif ESP-IDF USB Host Human Interface Device (HID) driver, specifically in versions prior to 1.1.0. The vulnerability stems from a race condition where both the USB event callback and user code can concurrently invoke hid_host_device_close(), leading to the same usb_transfer_t memory being freed twice. This occurs because the shared hid_iface_t state is accessed without proper synchronization or locking mechanisms, allowing simultaneous teardown of a READY interface. The double free results in heap metadata corruption within the ESP USB host stack, which can cause undefined behavior including crashes, memory corruption, or potentially arbitrary code execution. The vulnerability affects embedded devices using Espressif's USB host stack for HID devices, commonly found in IoT and embedded systems. The CVSS v3.1 score of 6.4 reflects medium severity, with attack vector being physical or local (AV:P), high attack complexity (AC:H), no privileges required (PR:N), and no user interaction (UI:N). The impact covers confidentiality, integrity, and availability, as exploitation could allow attackers to disrupt device operation or manipulate data. The issue was publicly disclosed on January 12, 2026, and fixed in ESP-IDF version 1.1.0. No known exploits have been reported in the wild, but the vulnerability poses a risk to devices that have not been updated. The root cause relates to improper concurrency control (CWE-667) and double free (CWE-415) in the USB host stack implementation.
Potential Impact
For European organizations, the impact of CVE-2025-68657 primarily concerns embedded and IoT devices using Espressif ESP-IDF USB host stacks, especially those interfacing with HID devices. Exploitation could lead to device crashes, denial of service, or potentially arbitrary code execution, compromising device availability and integrity. This could disrupt critical infrastructure, industrial control systems, or consumer IoT deployments. Confidentiality may also be at risk if attackers leverage heap corruption to execute code or access sensitive data. Given the widespread use of Espressif chips in IoT devices, sectors such as manufacturing, smart cities, healthcare, and automotive in Europe could be affected. The requirement for physical or local access to the USB host interface limits remote exploitation but does not eliminate risk in environments where attackers have proximity or insider access. The vulnerability could facilitate lateral movement or persistence in targeted attacks. Organizations relying on Espressif-based devices should assess their exposure and prioritize patching to maintain operational security.
Mitigation Recommendations
1. Upgrade all Espressif ESP-IDF USB Host HID driver instances to version 1.1.0 or later, where the vulnerability is fixed. 2. Implement strict access controls to USB host interfaces on embedded devices to prevent unauthorized physical or logical access. 3. Employ runtime monitoring and anomaly detection on USB host activity to identify unusual device teardown or memory corruption events. 4. For devices that cannot be immediately updated, consider disabling USB host HID functionality if not required. 5. Conduct thorough security audits of IoT and embedded device firmware to identify usage of vulnerable ESP-IDF versions. 6. Enforce network segmentation and physical security controls to limit attacker proximity to vulnerable devices. 7. Collaborate with device manufacturers to ensure timely firmware updates and vulnerability disclosures. 8. Integrate vulnerability management processes that track Espressif component versions and patch status across deployed devices.
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: 6965433ada2266e838fe6b3e
Added to database: 1/12/2026, 6:53:46 PM
Last enriched: 1/12/2026, 7:08:46 PM
Last updated: 1/13/2026, 12:25:54 AM
Views: 7
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.