CVE-2026-81507
Executive Summary
CVE-2026-81507 is an out-of-bounds read vulnerability (CWE-125) in the ESP-IDF BlueDroid Bluetooth host stack, specifically within L2CAP configuration-option processing in l2c_main.c and l2c_utils.c. It affects ESP32-class products running the BlueDroid host stack with Classic Bluetooth (BR/EDR) enabled, in versions prior to 5.2.8, 5.3.6, 5.5.5, 6.0.3, and 6.1-rc1. A remote, unauthenticated BR/EDR peer within radio range can send a malformed L2CAP configuration request that triggers the out-of-bounds read; under certain runtime conditions, limited adjacent Bluetooth stack memory may be reflected back in an outbound L2CAP Configuration Response, yielding an information disclosure with CVSS 3.1 base score of 6.5 (AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
The vulnerability resides in the BlueDroid L2CAP layer of ESP-IDF, the Espressif Internet of Things (IoT) Development Framework. L2CAP (Logical Link Control and Adaptation Protocol) sits above the Bluetooth baseband and provides connection-oriented and connectionless data services to upper layers (RFCOMM, AVDTP, BNEP, SDP, etc.). During L2CAP channel establishment, peers exchange Configuration Requests and Configuration Responses that carry a variable-length option list. Each option consists of a type, a length field, and a value.
The NVD description states that the BlueDroid L2CAP configuration-option processing "does not consistently validate option lengths against the remaining received packet bytes." This is a classic parser-trust defect: the length field advertised inside an option is consumed as a loop/boundary value without first confirming that the remaining bytes of the received packet are at least as long as the claimed option length. When the two disagree, the parser advances past or reads beyond the actual allocated/received buffer, producing an out-of-bounds read.
Because the flaw is an OOB read (CWE-125) rather than a write, there is no direct memory-corruption or code-execution primitive described. The confidentiality impact arises from two effects described in the advisory:
- The out-of-bounds read itself, which may cause the stack to access memory beyond the received packet buffer.
- Under "some runtime conditions," "limited adjacent Bluetooth stack memory can be included in an outbound L2CAP Configuration Response." In other words, bytes read out of bounds may be echoed back to the attacker in a legitimate protocol reply — a covert exfiltration channel over the Bluetooth link.
Affected surface: the L2CAP signaling channel, reachable by any BR/EDR peer that can complete a baseband connection and an L2CAP signaling exchange. Classic Bluetooth (BR/EDR) must be enabled — products using only Bluetooth Low Energy (BLE) via the controller or a different host stack are not described as affected. The vulnerable components are named explicitly in the description as l2c_main.c and l2c_utils.c within BlueDroid; no specific function names, structures, or option type identifiers are provided in the available data, so implementation-level specifics (exact option type code, exact buffer arithmetic) cannot be stated and must not be fabricated.
Root cause class: insufficient bounds checking / improper input validation of a length field against remaining buffer size (CWE-125, closely related to CWE-20 improper input validation). The fix in 5.2.8, 5.3.6, 5.5.5, 6.0.3, and 6.1-rc1 is described as consistent validation of option lengths against remaining packet bytes — i.e., the patch adds/clarifies bounds checks in the two named source files.
Exploitation Scenarios
No public proof-of-concept, Nuclei template, or exploit code exists for CVE-2026-81507 as of this writing. The attack chain below is therefore inferred from the vulnerability class (out-of-bounds read in a length-delimited protocol parser) and the constraints stated in the NVD description. No specific code patterns or function names beyond those in the advisory are asserted.
Reconnaissance / target identification. The attacker must be a BR/EDR (Classic Bluetooth) peer within radio range of an affected target. Targets are ESP32-class devices running vulnerable ESP-IDF BlueDroid with Classic Bluetooth enabled — e.g., audio gateways, serial-over-Bluetooth bridges, industrial gateways, and consumer appliances. An adversary in physical or RF proximity (the "adjacent" AV:A vector) identifies discoverable or connectable devices and enumerates L2CAP support through normal baseband inquiry/connection and L2CAP signaling. Radio range and antenna class define the practical reach; a directional/high-gain antenna or proximity placement extends it.
How the specific flaw is triggered. After establishing a baseband connection, the attacker opens an L2CAP signaling channel and sends a malformed Configuration Request whose embedded configuration-option length field is inconsistent with the number of remaining bytes actually present in the packet. Because BlueDroid's option processing in the affected code paths does not consistently compare the declared option length against the remaining received bytes, the parser reads past the end of the received buffer (the out-of-bounds read).
Payload / execution method at the vulnerability-class level. The "payload" is a crafted, protocol-valid-enough L2CAP signaling PDU carrying an L2CAP configuration option with a manipulated length/value relationship. It is not shellcode and requires no authentication or user interaction (PR:N, UI:N per the CVSS vector). The trigger is delivered over the air at the Bluetooth protocol layer; the flaw is exercised purely by malformed field values.
Post-exploitation impact. The primary effect is information disclosure: out-of-bounds stack memory may be read, and under some runtime conditions a limited portion of adjacent Bluetooth stack memory can be returned inside an outbound L2CAP Configuration Response — the attacker may read protocol responses to harvest those leaked bytes across repeated attempts. Impact is bounded to confidentiality (C:H) with no integrity or availability effect (I:N, A:N) and no scope change (S:U). Certain runtime conditions may cause a hang/reset, but this is not asserted by the CVSS vector and is not claimed here.
Note: Because no public exploit exists, real-world weaponization would require the attacker to reverse-engineer the L2CAP option handling on the target firmware — plausible for a motivated adversary but unverified from available data.
Impact Assessment
- Confidentiality (C:H): High. The out-of-bounds read and potential inclusion of adjacent Bluetooth stack memory in an outbound L2CAP Configuration Response can expose memory contents to an unauthenticated adjacent attacker. Because Bluetooth stack memory may hold pointers, connection state, keys or key-adjacent material, peer identifying data, or fragments of other protocol data, the information-disclosure impact is rated High.
- Integrity (I:N): None per the CVSS vector — the flaw is a read, not a write.
- Availability (A:N): None per the CVSS vector. The advisory does not describe a crash/DoS condition.
- Attack Vector (AV:A): Adjacent. Exploitation requires RF proximity/within-radio-range access to the BR/EDR interface — it cannot be launched over the internet against a device whose Bluetooth is unreachable, but it is not local/logical access either.
- Complexity/Auth/Interaction: AC:L, PR:N, UI:N — no credentials and no victim interaction needed once the attacker is a connectable BR/EDR peer; the malformed request is self-contained.
- Scope (S:U): Unchanged — impact is confined to the Bluetooth host stack.
Blast radius / business impact: Any product embedding an affected ESP32-class SoC with BlueDroid and Classic Bluetooth enabled shares the exposure. Although firmware runs on resource-constrained embedded hardware, the affected devices frequently sit at the edge of OT/ICS, building automation, medical peripherals, point-of-sale accessories, audio/telephony products, and consumer IoT. A successful leak can aid follow-on attacks (e.g., recovering pointers/state to defeat ASLR-style protections in a subsequent, different bug, or revealing peer/protocol data). CVSS base 6.5 (Medium) reflects High confidentiality against an adjacent, low-complexity, no-auth, no-interaction attack. EPSS is not yet scored by FIRST.org. CVE-2026-81507 is not listed in CISA KEV, and no exploit-in-the-wild or threat-actor campaign is known from the provided data.
Detection Guidance
Detection for Bluetooth-layer flaws is inherently difficult for network IDS because the traffic is over the air and rarely mirrored to IP networks. The rules below are best-effort engineering aids: they focus on host-side/firmware indicators (ESP-IDF version and BlueDroid/L2CAP behavior) and on IP-side proxies (Bluetooth-to-IP gateways, management telemetry) where relevant. Treat the Sigma/YARA/Elastic/Splunk/Wazuh rules as version- and context-correlation detections, not as direct over-the-air signatures.
Sigma Rule
title: ESP-IDF BlueDroid L2CAP Version Detected on Vulnerable Branch (CVE-2026-81507)
id: 3f9c1a72-8b41-4e5d-9c2a-esp32l2cap81507
status: experimental
description: Detects inventory/log artifacts indicating ESP-IDF versions prior to the
BlueDroid L2CAP fix (5.2.8, 5.3.6, 5.5.5, 6.0.3, 6.1-rc1) on ESP32-class firmware.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-81507
author: valtersit.com
date: 2026-01-01
logsource:
product: linux
service: application
detection:
keywords_idf:
- 'ESP-IDF v5.0'
- 'ESP-IDF v5.1'
- 'ESP-IDF v5.2'
- 'ESP-IDF v5.3'
- 'ESP-IDF v5.5'
- 'ESP-IDF v6.0'
- 'esp-idf: v5'
- 'Bluedroid'
keywords_l2cap:
- 'l2c_main.c'
- 'l2c_utils.c'
- 'L2CAP Configuration Request'
- 'L2CAP Configuration Response'
condition: keywords_idf and keywords_l2cap
falsepositives:
- Vendors legitimately logging BlueDroid details on already-patched firmware
level: medium
tags:
- attack.t1190
- cve.2026-81507
YARA Rule
rule CVE_2026_81507_ESPIDF_BlueDroid_L2CAP_Vulnerable
{
meta:
author = "valtersit.com"
description = "Detects ESP-IDF firmware components referencing BlueDroid L2CAP sources associated with CVE-2026-81507"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2026-81507"
date = "2026-01-01"
cve = "CVE-2026-81507"
strings:
$src1 = "l2c_main.c" ascii wide
$src2 = "l2c_utils.c" ascii wide
$bd1 = "Bluedroid" ascii wide
$bd2 = "BLUEDROID" ascii
$idf1 = "ESP-IDF" ascii wide
$magic = { E9 } // ESP32 firmware image header byte
condition:
uint16(0) == 0xE9 or $magic at 0
or (any of ($src1, $src2) and any of ($bd1, $bd2))
or ($idf1 and any of ($bd1, $bd2))
}
Suricata IDS Rule
alert ip any any -> any any (msg:"CVE-2026-81507 ESP-IDF BlueDroid L2CAP config-option OOB read (correlation via Bluetooth-to-IP gateway)"; flow:to_server,established; content:"|0D 00|"; byte_test:2,>,0,0,relative; threshold:type limit, track by_src, count 1, seconds 60; reference:cve,2026-81507; reference:url,nvd.nist.gov/vuln/detail/CVE-2026-81507; metadata:affected_product ESP32, attack_target IoT, deployment Perimeter, created_at 2026_01_01, cve CVE_2026_81507; classtype:attempted-recon; sid:202681507; rev:1;)
Note: L2CAP signaling is a Bluetooth over-the-air protocol and is not normally visible to IP IDS. The rule above is a correlation stub for deployments that tunnel/mirror Bluetooth traffic to IP (e.g., Bluetooth-to-IP gateways). It is not a reliable over-the-air signature.
Elastic Detection
sequence by host.id with maxspan=5m
[ process where event.type == "start" and process.name : ("btmon", "hcitool", "bluetoothctl", "gatttool") ]
[ file where file.name : ("l2c_main.c", "l2c_utils.c")
or (file.path : "*bluedroid*" and file.extension : ("c", "h")) ]
// Inventory-style detection: vulnerable ESP-IDF branch reported by management telemetry
any where event.category == "host"
and event.action == "agent_metadata"
and (
process.name : "esp-idf*" or host.os.version : "5.0*" or host.os.version : "5.1*"
or host.os.version : "5.2*" or host.os.version : "5.3*" or host.os.version : "5.5*"
or host.os.version : "6.0*"
)
and not host.os.version : ("5.2.8", "5.3.6", "5.5.5", "6.0.3")
Splunk SPL Query
index=inventory OR index=ot_assets sourcetype IN ("esp_firmware","bluetooth_gateway","asset_inventory")
| eval ver=coalesce(firmware_version, idf_version, os_version)
| where match(ver, "^5\.(0|1|2)\.|^5\.3\.|^5\.5\.|^6\.0\.")
| where NOT match(ver, "^5\.2\.8$|^5\.3\.6$|^5\.5\.5$|^6\.0\.3$|^6\.1-rc1$")
| stats count by host, ver, vendor, product
| sort - count
index=bt_gateway sourcetype="btmon" OR sourcetype="bluetooth_l2cap"
| search "Configuration Request" OR "Configuration Response" OR l2cap
| eval malformed=if(match(_raw,"(?i)length.*mismatch|truncated|oob|invalid option"),1,0)
| where malformed=1
| table _time host src_dst malformed _raw
Wazuh OSSEC Rule
<group name="cve_2026_81507,esp_idf,bluetooth,">
<!-- Detect vulnerable ESP-IDF / BlueDroid version reported by agents -->
<rule id="100815070" level="10">
<decoded_as>json</decoded_as>
<field name="firmware_version">\.?</field>
<match>ESP-IDF</match>
<regex>(v)?5\.(0|1|2)\.(0|[0-7])|5\.3\.[0-5]|5\.5\.[0-4]|6\.0\.[0-2]</regex>
<description>CVE-2026-81507: vulnerable ESP-IDF BlueDroid L2CAP version detected</description>
<mitre>
<id>T1190</id>
</mitre>
<group>vulnerability_detected,</group>
</rule>
<rule id="100815071" level="12">
<decoded_as>syslog</decoded_as>
<match>Bluedroid</match>
<regex>l2c_(main|utils)\.c|L2CAP Configuration (Request|Response)</regex>
<description>CVE-2026-81507: BlueDroid L2CAP configuration processing activity observed</description>
<mitre>
<id>T1190</id>
</mitre>
<group>bluetooth_response,</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source). No vendor fix reference or workaround is currently recorded from tracked sources. The remediation versions below are taken solely from the NVD description and must be independently validated against vendor advisories before deployment.
1) Immediate mitigations (reduce exposure until upgrade):
- Disable Classic Bluetooth (BR/EDR) where not required. The vulnerability requires BlueDroid with Classic Bluetooth enabled; BLE-only operation or Bluetooth fully off removes the attack surface described.
- Minimize discoverability and connectability. Restrict BR/EDR pairing/connection windows, and where the use case allows, gate connections to known/paired peers. (Note: this is a hardening measure — the flaw is described as reachable by an unauthenticated peer, so pairing restrictions are not a guaranteed control.)
- Apply RF-proximity controls. Since the attack vector is adjacent (AV:A), physical/RF access control (site security, antenna shielding, RF monitoring for rogue BR/EDR peers) is a meaningful compensating control.
- Segment and monitor Bluetooth-to-IP gateways that bridge embedded devices to IP networks, since they are the most likely place to observe anomalous behavior.
2) Patch / upgrade steps:
- Upgrade ESP-IDF to 5.2.8, 5.3.6, 5.5.5, 6.0.3, or 6.1-rc1 (or later), per the NVD description.
- For downstream OEM products, obtain a firmware update from the product vendor that incorporates a fixed ESP-IDF; embedded ESP32 devices typically cannot be patched in the field without vendor firmware. Track vendor SBOMs/components for the ESP-IDF version in use.
- Rebuild and reflash affected firmware images, then verify the running version (the fix is described as consistent option-length validation in
l2c_main.candl2c_utils.c). - Validate the fix independently: no CNA/vendor advisory patch reference or diff is currently available from tracked sources, so confirm the containing release actually includes the corrected bounds checks.
3) Long-term hardening:
- Maintain continuous firmware/component inventory for all ESP32-class devices (ESP-IDF version, host stack config, Bluetooth mode) and alert on non-remediated versions.
- Enforce vendor SBOM/advisory tracking for Bluetooth host stacks; treat BlueDroid/L2CAP as a security-relevant attack surface in threat models.
- Prefer BLE-only configurations where Classic Bluetooth is not a functional requirement.
- Fuzz the L2CAP configuration parser and Bluetooth host stack in firmware CI (length-field mismatch, truncated options, oversized/undersized option lengths) since this defect class is parser-boundary related.
- Apply defense-in-depth on the embedded side: enable any available stack hardening, keep watchdog/secure-boot/rollback protections current, and restrict what sensitive material is resident in Bluetooth stack memory.
References
- NVD — CVE-2026-81507: https://nvd.nist.gov/vuln/detail/CVE-2026-81507
- NVD CWE-125 (Out-of-bounds Read): https://cwe.mitre.org/data/definitions/125.html
- FIRST EPSS (not yet scored for CVE-2026-81507): https://www.first.org/epss/
- CISA Known Exploited Vulnerabilities Catalog (CVE-2026-81507 NOT listed as of this report): https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- Espressif ESP-IDF project / repository (verify the fixed releases 5.2.8, 5.3.6, 5.5.5, 6.0.3, 6.1-rc1 in ESP-IDF release notes and BlueDroid L2CAP source): https://github.com/espressif/esp-idf
Threat-actor context: none available. No exploit-in-the-wild evidence, no CISA KEV listing, and no known threat-actor campaign is associated with CVE-2026-81507 in the provided intelligence. No public PoC, Nuclei template, or exploit code is known.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.