CVE-2026-25507

6.3 MEDIUM

📋 TL;DR

A use-after-free vulnerability in the ESP-IDF BLE provisioning transport layer allows remote attackers to trigger invalid memory access via Bluetooth Low Energy connections. This affects IoT devices using vulnerable ESP-IDF versions while in provisioning mode with keep_ble_on=true configuration. The vulnerability can lead to crashes or potential code execution.

💻 Affected Systems

Products:
  • Espressif IoT Development Framework (ESP-IDF)
Versions: 5.5.2, 5.4.3, 5.3.4, 5.2.6, 5.1.6 and earlier versions with same code
Operating Systems: FreeRTOS-based ESP32/ESP8266 systems
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when BLE provisioning is enabled with keep_ble_on=true parameter during provisioning stop

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete device compromise, data theft, or device bricking

🟠

Likely Case

Device crash or denial of service, potentially allowing privilege escalation in multi-tenant environments

🟢

If Mitigated

Limited to denial of service if memory protections are enabled, but still poses availability risk

🌐 Internet-Facing: MEDIUM - Requires BLE proximity but devices may be deployed in accessible locations
🏢 Internal Only: LOW - Requires physical or close-range BLE access to internal networks

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires BLE access to device in provisioning mode, but no authentication needed once connected

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.5.3, 5.4.4, 5.3.5, 5.2.7, 5.1.7

Vendor Advisory: https://github.com/espressif/esp-idf/security/advisories

Restart Required: Yes

Instructions:

1. Update ESP-IDF using 'git pull' from official repository. 2. Rebuild firmware with updated SDK. 3. Flash updated firmware to affected devices. 4. Verify BLE provisioning works correctly.

🔧 Temporary Workarounds

Disable keep_ble_on during provisioning stop

all

Set keep_ble_on=false when stopping BLE provisioning to avoid the vulnerable code path

esp_ble_mesh_provisioner_prov_enable(false)

Disable BLE provisioning entirely

all

Remove or disable BLE provisioning features if not required

# Disable BLE provisioning in sdkconfig: CONFIG_BT_ENABLED=n

🧯 If You Can't Patch

  • Disable BLE provisioning mode in production devices
  • Implement network segmentation to limit BLE access to trusted devices only

🔍 How to Verify

Check if Vulnerable:

Check ESP-IDF version and verify if BLE provisioning with keep_ble_on=true is configured

Check Version:

grep -E 'ESP-IDF v(5\.(5\.2|4\.3|3\.4|2\.6|1\.6))' sdkconfig or check build logs

Verify Fix Applied:

Verify ESP-IDF version is patched and test BLE provisioning stop with keep_ble_on=true

📡 Detection & Monitoring

Log Indicators:

  • Memory access violation logs
  • BLE provisioning stop events with errors
  • Device crashes during BLE operations

Network Indicators:

  • Unexpected BLE disconnections during provisioning
  • Multiple BLE connection attempts to provisioning services

SIEM Query:

device_logs: "protocomm_ble" AND ("use-after-free" OR "memory violation" OR "segmentation fault")

🔗 References

📤 Share & Export