Description (CNA)
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.
Affected (CNA)
| Vendor / product | Versions |
|---|---|
| Koenkk / zigbee2mqtt | affected 0 through 2.12.0 |
CWE
CWE-22
References
- https://github.com/Koenkk/zigbee2mqtt
- https://github.com/Koenkk/zigbee2mqtt/blob/master/lib/extension/externalJS.ts
ADP enrichment
No English description supplied.
No references supplied.