CVE-2026-71279: CWE-22 in Koenkk zigbee2mqtt
Zigbee2MQTT's ExternalJSExtension.getFilePath (lib/extension/externalJS.ts) joins a 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. 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.
AI Analysis
Technical Summary
The vulnerability exists in the ExternalJSExtension.getFilePath function of zigbee2mqtt, which constructs a file path by joining a base path with a user-supplied name parameter received through an MQTT topic. The only validation performed is that the filename ends with .js, .mjs, or .cjs, but no path sanitization is done to prevent directory traversal (CWE-22). This flaw enables an attacker with access to the MQTT topic zigbee2mqtt/bridge/request/extension/save to write malicious JavaScript files outside the intended directory and have them dynamically imported by Node.js, resulting in remote code execution.
Potential Impact
An attacker with low privileges and access to the MQTT message topic can achieve remote code execution on the host running zigbee2mqtt. This compromises confidentiality, integrity, and availability of the system. The CVSS v3.1 score is 8.1 (high), reflecting the ease of exploitation and the severe impact on system control.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict access to the MQTT topic zigbee2mqtt/bridge/request/extension/save to trusted users only and monitor for suspicious activity related to extension saving. Avoid exposing the MQTT broker to untrusted networks.
CVE-2026-71279: CWE-22 in Koenkk zigbee2mqtt
Description
Zigbee2MQTT's ExternalJSExtension.getFilePath (lib/extension/externalJS.ts) joins a 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. 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.
CVSS v3.1
Score 8.1high
Affected software
Koenkk
zigbee2mqtt
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the ExternalJSExtension.getFilePath function of zigbee2mqtt, which constructs a file path by joining a base path with a user-supplied name parameter received through an MQTT topic. The only validation performed is that the filename ends with .js, .mjs, or .cjs, but no path sanitization is done to prevent directory traversal (CWE-22). This flaw enables an attacker with access to the MQTT topic zigbee2mqtt/bridge/request/extension/save to write malicious JavaScript files outside the intended directory and have them dynamically imported by Node.js, resulting in remote code execution.
Potential Impact
An attacker with low privileges and access to the MQTT message topic can achieve remote code execution on the host running zigbee2mqtt. This compromises confidentiality, integrity, and availability of the system. The CVSS v3.1 score is 8.1 (high), reflecting the ease of exploitation and the severe impact on system control.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict access to the MQTT topic zigbee2mqtt/bridge/request/extension/save to trusted users only and monitor for suspicious activity related to extension saving. Avoid exposing the MQTT broker to untrusted networks.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- TuranSec
- Date Reserved
- 2026-08-05T12:23:34.967Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a7336e5bf8831d539ed9267
Added to database: 08/05/2026, 13:13:09 UTC
Last enriched: 08/12/2026, 14:34:18 UTC
Last updated: 09/17/2026, 22:01:38 UTC
Views: 38
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.