Skip to main content

xiaozhi-esp32 CVE-2026-13491

| EUVDEUVD-2026-39991 LOW
Improper Resource Shutdown or Release (CWE-404)
2026-06-28 VulDB GHSA-rwf9-x45x-533w
2.9
CVSS 4.0 · Vendor: VulDB

Severity by source

Vendor (VulDB) PRIMARY
2.9 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
3.7 LOW

Network-reachable via MQTT but AC:H due to required message crafting knowledge; PR:N per CVSS 4.0 input; availability only, low impact as session crash may auto-recover.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
Severity Changed
Jun 28, 2026 - 12:22 NVD
MEDIUM LOW
CVSS changed
Jun 28, 2026 - 12:22 NVD
6.3 (MEDIUM) 2.9 (LOW)
Source Code Evidence Fetched
Jun 28, 2026 - 11:51 vuln.today
Analysis Generated
Jun 28, 2026 - 11:51 vuln.today

DescriptionCVE.org

A vulnerability was detected in 78 xiaozhi-esp32 up to 2.2.6. This vulnerability affects the function Application::GetInstance of the file main/protocols/mqtt_protocol.cc of the component MQTT Goodbye Handler. Performing a manipulation of the argument session_id results in denial of service. The attack is possible to be carried out remotely. The complexity of an attack is rather high. It is stated that the exploitability is difficult. The exploit is now public and may be used. The patch is named e182471f8c5a22434346bd98da34d3b66c8c8b3e. It is recommended to apply a patch to fix this issue.

AnalysisAI

Denial-of-service in xiaozhi-esp32 MQTT firmware (versions up to 2.2.6) allows a remote attacker to crash the device's MQTT session handler by sending a crafted goodbye message containing a non-string session_id field. The MQTT Goodbye Handler in mqtt_protocol.cc fails to validate the cJSON type of the session_id node before dereferencing its valuestring member, producing undefined behavior that terminates the session. A public proof-of-concept exists (GitHub issue #2022), but attack complexity is rated high (AC:H) and the vulnerability is not listed in the CISA KEV catalog, suggesting exploitation requires deliberate effort rather than opportunistic scanning.

Technical ContextAI

xiaozhi-esp32 (CPE: cpe:2.3:a:78:xiaozhi-esp32:*:*:*:*:*:*:*:*) is an open-source AI assistant firmware targeting Espressif ESP32 microcontrollers. Communication is handled over MQTT, and the affected code path processes 'goodbye' control messages that signal session termination. The vulnerable code in MqttProtocol::StartMqttClient (mqtt_protocol.cc, line ~114) used a raw NULL check - session_id == nullptr - before accessing session_id->valuestring. Because cJSON nodes can be non-null while representing non-string types (numbers, booleans, arrays, objects), a crafted goodbye message with a non-string session_id bypasses the NULL guard and dereferences an invalid or null valuestring pointer. The root cause class is CWE-404 (Improper Resource Shutdown or Release), reflecting that the session teardown path fails to properly validate inputs before releasing session state, though the mechanism is more precisely a cJSON type-confusion leading to an unsafe dereference during shutdown.

RemediationAI

Apply the upstream patch commit e182471f8c5a22434346bd98da34d3b66c8c8b3e, available via GitHub pull request #2023 (https://github.com/78/xiaozhi-esp32/pull/2023). The fix replaces the unsafe NULL check with cJSON_IsString(session_id) and changes the session_id match condition from a logical OR (allowing a null session_id to trigger goodbye for any session) to a logical AND (requiring a valid string match), correcting both the type-safety issue and a logic flaw in session matching. A released tagged version incorporating this fix is not independently confirmed from the available data - operators should build from the patched commit directly. As a compensating control if patching is not immediately feasible, restrict MQTT broker access to trusted clients only using broker-level ACLs or network segmentation, which limits the attack surface to authenticated or internal actors. Note that broker-level controls do not eliminate the vulnerability but reduce the pool of potential attackers.

Share

CVE-2026-13491 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy