Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain publish access to unauthenticated MQTT broker
-
DeliveryPublish crafted extension save message with traversal name
-
ExploitgetFilePath() resolves path outside extensions directory
-
ExecutionMalicious .js payload written to arbitrary host path
-
PersistNode.js import() immediately executes payload
-
ImpactRCE as Zigbee2MQTT process user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Two conditions must both be met: (1) enable_external_js must be set to true in the Zigbee2MQTT configuration - this option defaults to false, meaning default-configured deployments are not reachable through this code path, but the description explicitly characterizes it as commonly enabled in legacy installations; (2) the attacker must have publish access to the MQTT broker on topic zigbee2mqtt/bridge/request/extension/save - CVSS AV:A/PR:L reflects adjacent-network low-privilege access, but the description states that real-world Zigbee2MQTT MQTT brokers are frequently unauthenticated, effectively making this condition trivially satisfiable in a large fraction of deployments. Exploitation is further limited to the fact that the extension name must terminate in .js, .mjs, or .cjs, which is trivially satisfied by path traversal payloads (e.g., ../../tmp/evil.js). No specific platform, OS version, or Zigbee hardware configuration is required beyond the two conditions above. |
| Impact | The CVSS 8.0 base score (AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) correctly reflects the adjacent-network requirement: the attacker must publish to the MQTT broker, which is nominally a PR:L condition. However, the CVE description explicitly states that MQTT brokers in real Zigbee2MQTT deployments are frequently unauthenticated, effectively collapsing PR:L toward PR:N in a significant portion of real-world targets and elevating practical risk above what the CVSS score alone implies. The second gating condition - enable_external_js must be true - is off by default, which is a meaningful mitigation; however, the description characterizes it as commonly enabled in legacy installations, so this is not a strong deterrent for the installed base. No KEV listing, EPSS score, or confirmed POC was provided in the input data, so active exploitation cannot be confirmed at this time. The dual-impact nature of the flaw (RCE plus arbitrary file deletion via the same vulnerable function) is atypical and increases the overall risk surface beyond what a single-primitive vulnerability would carry. Real-world priority should be elevated for any deployment where enable_external_js is true and the MQTT broker is unauthenticated. |
| Exploit ScenarioDerived | An attacker with network access to an unauthenticated MQTT broker publishes a message to zigbee2mqtt/bridge/request/extension/save with a JSON body where the name field is set to ../../tmp/evil.js and the content field contains arbitrary JavaScript (for example, a reverse shell). Zigbee2MQTT's getFilePath() resolves the traversal, writes the payload to /tmp/evil.js outside the extensions directory, and immediately imports it via Node.js import(), executing the attacker's code as the Zigbee2MQTT process user. No publicly confirmed POC was identified in the provided data, but the exploitation path requires no specialized knowledge beyond crafting an MQTT publish message. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 05, 2026
Remote code execution and arbitrary file deletion in Zigbee2MQTT stem from an unsanitized path.join() call in ExternalJSExtension.getFilePath() (lib/extension/externalJS.ts), allowing any MQTT client with publish access to escape the extensions directory via traversal sequences and write arbitrary files to the host filesystem. Once the malicious .js file is written, Zigbee2MQTT immediately imports it via Node.js import(), executing attacker-controlled code in the application process context. The same vulnerable code path also backs the extension-removal handler, yielding a second primitive for arbitrary file deletion. No public exploit or KEV listing was identified at time of analysis, but the exploitation path is mechanically straightforward given the detailed description.
RemediationAI
No vendor-released patched version was confirmed from the provided references at time of analysis; operators should monitor the Zigbee2MQTT GitHub repository at https://github.com/Koenkk/zigbee2mqtt for an official fix and upgrade immediately upon release. The most impactful compensating control is to set enable_external_js to false (its default) in the Zigbee2MQTT configuration - this removes the extension save and delete MQTT handlers entirely, eliminating the attack surface with no functional impact for deployments that do not use external JS extensions. If enable_external_js cannot be disabled, enforce MQTT broker authentication (username/password or mutual TLS) so that only trusted clients can publish to any topic; this raises the attacker's required access from adjacent-unauthenticated to adjacent-authenticated. Additionally, configure MQTT broker ACLs to restrict publish rights on zigbee2mqtt/bridge/request/extension/save to only the Zigbee2MQTT service account itself, preventing lateral abuse from other broker clients. Note that ACL-only mitigations without disabling enable_external_js leave the path traversal logic reachable from any client that can escalate MQTT privileges.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Zigbee2MQTT (cpe:2.3:a:koenkk:zigbee2mqtt:*:*:*:*:*:*:*:*) is an open-source Node.js bridge that connects Zigbee devices to an MQTT broker, most commonly deployed on Raspberry Pi or Linux single-board computers in home automation environments. The root cause is CWE-22 (Path Traversal) in lib/extension/externalJS.ts: the getFilePath() method constructs a filesystem path with path.join(basePath, name), where name is taken directly from the MQTT message payload on topic zigbee2mqtt/bridge/request/extension/save. While path.join() normalizes the resulting path, it does not strip or reject ../ sequences - a name value of ../../tmp/evil.js resolves cleanly to a path outside the intended extensions directory. The only server-side guard is a suffix check enforcing .js, .mjs, or .cjs extensions, which is trivially bypassed by the traversal payload itself (../../tmp/evil.js satisfies the check). After writing the file, the handler invokes Node.js dynamic import() on the resolved path, converting a write-to-disk primitive directly into code execution. The getFilePath() function is shared verbatim with the extension-deletion handler, making the same traversal available as an arbitrary file deletion primitive.
Know when Zigbee2Mqtt gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Adjacent vector and low privileges reflect MQTT broker publish access; full CIA follows from arbitrary code execution in the application process.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
Lifecycle Timeline
2DescriptionCVE.org
Zigbee2MQTT's ExternalJSExtension.getFilePath() (lib/extension/externalJS.ts) joins a name parameter received via an MQTT message (topic zigbee2mqtt/bridge/request/extension/save) into the extensions base path using path.join(basePath, name) with no sanitization. Because path.join() resolves ../ sequences, a name such as ../../tmp/evil.js escapes the intended extensions directory. The extension handler only validates that the name ends in .js/.mjs/.cjs, writes the file, and then dynamically imports it via Node.js import(), achieving remote code execution. Requires the enable_external_js config option (off by default, but commonly enabled in legacy installs) and MQTT broker access, which is frequently unauthenticated in real deployments. The identical unsanitized getFilePath() is also used by the extension-removal handler, enabling arbitrary file deletion.
Articles & Coverage 1
Executive ViewAI
Zigbee2MQTT contains a critical vulnerability enabling remote code execution and arbitrary file deletion for any attacker with access to publish messages on the MQTT broker. No public exploit has been identified at time of analysis, but the exploitation mechanism is mechanically straightforward. This poses an immediate threat to IoT gateway deployments and any connected systems that rely on Zigbee2MQTT for automation and control.
No vendor-released patch identified at time of analysis. Restrict MQTT broker publish access to authenticated, trusted clients via broker authentication and authorization controls; implement network segmentation to isolate Zigbee2MQTT instances from untrusted networks; disable the ExternalJS extension if not required for operations; deploy real-time monitoring on file system modifications and MQTT message patterns to detect exploitation attempts; consider temporarily disabling Zigbee2MQTT in non-critical environments pending patch availability.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-53364
GHSA-77vh-g47p-vh46
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB