Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-81507 Overview
CVE-2026-81507 is an out-of-bounds read vulnerability [CWE-125] in the Espressif IoT Development Framework (ESP-IDF). The flaw resides in the BlueDroid host stack's L2CAP configuration-option processing, specifically in l2c_main.c and l2c_utils.c. These files do not consistently validate option lengths against the remaining received packet bytes.
A remote unauthenticated BR/EDR peer within radio range can send a malformed L2CAP configuration request to trigger the condition. Under certain runtime conditions, adjacent Bluetooth stack memory may be leaked back to the attacker inside an outbound L2CAP Configuration Response. The issue affects ESP32-class products using the BlueDroid host stack with Classic Bluetooth enabled.
Critical Impact
An unauthenticated Bluetooth peer within radio range can read limited adjacent Bluetooth stack memory from vulnerable ESP32 devices without any user interaction.
Affected Products
- Espressif ESP-IDF prior to 5.2.8, 5.3.6, 5.5.5, 6.0.3, and 6.1-rc1
- ESP32-class products using the BlueDroid host stack
- Devices with Classic Bluetooth (BR/EDR) enabled
Discovery Timeline
- 2026-10-13 - CVE-2026-81507 published to NVD
- 2026-10-14 - Last updated in NVD database
Technical Details for CVE-2026-81507
Vulnerability Analysis
The vulnerability affects the Logical Link Control and Adaptation Protocol (L2CAP) layer of the BlueDroid Bluetooth stack bundled with ESP-IDF. L2CAP configuration requests contain a sequence of type-length-value (TLV) options. The vulnerable code parses these options without consistently checking whether the declared option length exceeds the remaining packet bytes.
When the parser accepts an attacker-controlled oversized length, subsequent memory reads extend past the input buffer boundary. The function l2cu_send_peer_config_rej in l2c_utils.c builds a rejection response that can include this out-of-bounds data. The response is transmitted back to the peer over the air, enabling an information disclosure primitive.
Root Cause
The root cause is missing length validation [CWE-125] in L2CAP option parsing. The patched version introduces an explicit opt_len variable and buffer length checks across the configuration handling path. Without this check, the parser trusts peer-supplied option lengths that may extend beyond the actual received packet.
Attack Vector
Exploitation requires only Bluetooth radio range (Adjacent Network) to a vulnerable ESP32 device with Classic Bluetooth enabled. No authentication or user interaction is required. An attacker sends a crafted L2CAP configuration request containing a malformed option length field. The device parses the option, reads past the input buffer, and may echo adjacent Bluetooth stack memory in a configuration response.
// Patch from components/bt/host/bluedroid/stack/l2cap/l2c_utils.c
void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len, UINT16 rej_len)
{
BT_HDR *p_buf;
- UINT16 len, cfg_len, buf_space, len1;
+ UINT16 len, cfg_len, buf_space, len1, opt_len;
UINT8 *p, *p_hci_len, *p_data_end;
UINT8 cfg_code;
Source: Espressif Commit 14c9955. The patch introduces an opt_len tracking variable used to validate each option against the remaining buffer space before copying bytes into the rejection response.
Detection Methods for CVE-2026-81507
Indicators of Compromise
- Unexpected L2CAP Configuration Reject responses sent from ESP32 devices to unpaired peers within Bluetooth range.
- Malformed L2CAP configuration request packets containing option length fields that exceed the overall packet size.
- Unusual Bluetooth pairing or connection attempts to IoT devices from unknown BR/EDR source addresses.
Detection Strategies
- Capture Bluetooth HCI traces on test devices and inspect L2CAP configuration request/response pairs for oversized option length fields.
- Inventory deployed ESP32-based products and cross-reference firmware builds against ESP-IDF versions prior to 5.2.8, 5.3.6, 5.5.5, 6.0.3, and 6.1-rc1.
- Review firmware build manifests and software bills of materials (SBOMs) for the BlueDroid host stack with Classic Bluetooth enabled.
Monitoring Recommendations
- Monitor Bluetooth-enabled IoT fleets for anomalous radio activity, especially repeated connection attempts from unknown peers.
- Track vendor firmware release feeds for ESP-IDF-based products and alert when devices run outdated SDK versions.
- Log Bluetooth stack errors and configuration rejection events from ESP32 devices where telemetry is available.
How to Mitigate CVE-2026-81507
Immediate Actions Required
- Upgrade ESP-IDF to version 5.2.8, 5.3.6, 5.5.5, 6.0.3, or 6.1-rc1 and rebuild affected firmware images.
- Deploy updated firmware to all ESP32-class devices that use the BlueDroid host stack with Classic Bluetooth enabled.
- Audit product lines for any dependency on BR/EDR and disable Classic Bluetooth where not required.
Patch Information
Espressif published fixes across multiple release branches. Reference the Espressif Security Advisory GHSA-v335-fxwc-rc44 and the fixed releases: v5.2.8, v5.3.6, v5.5.5, v6.0.3, and v6.1-rc1. The patch adds buffer length validation across L2CAP configuration option processing paths.
Workarounds
- Disable Classic Bluetooth (BR/EDR) in device configuration when only BLE functionality is required.
- Switch the Bluetooth host stack from BlueDroid to NimBLE where product requirements permit, since the flaw is specific to BlueDroid L2CAP code.
- Restrict device deployment to physically controlled environments to reduce exposure to unauthenticated Bluetooth peers within radio range.
# Example ESP-IDF menuconfig option to disable Classic Bluetooth
# CONFIG_BT_CLASSIC_ENABLED is not set
idf.py menuconfig
# Navigate to: Component config -> Bluetooth -> Bluedroid Options
# Disable: Classic Bluetooth
idf.py fullclean && idf.py build && idf.py flash
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

