Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-71279: CWE-22 in Koenkk zigbee2mqtt

0
High
Published: 08/05/2026 (08/05/2026, 15:32:20 UTC)
Source: CVE Database V5
Vendor/Project: Koenkk
Product: zigbee2mqtt

Description

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.

CVSS v3.1

Score 8.1high

Attack Vector
Adjacent Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/05/2026, 13:29:28 UTC

Technical Analysis

The vulnerability in Zigbee2MQTT's ExternalJSExtension.getFilePath() function arises from unsanitized use of a 'name' parameter received via MQTT messages. The function uses path.join(basePath, name) without sanitization, allowing path traversal sequences like '../' to escape the intended directory. The extension handler only checks that the filename ends with .js/.mjs/.cjs, then writes and dynamically imports the file using Node.js import(), enabling remote code execution. Additionally, the same unsanitized path handling is used in the extension removal handler, permitting arbitrary file deletion. Exploitation requires the 'enable_external_js' config option to be enabled and MQTT broker access, which is often unauthenticated in real deployments.

Potential Impact

Successful exploitation allows an attacker with MQTT broker access and the 'enable_external_js' option enabled to execute arbitrary code remotely on the host running Zigbee2MQTT. It also permits arbitrary file deletion via the extension removal handler. This can lead to full compromise of the affected system, including confidentiality, integrity, and availability impacts.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, disabling the 'enable_external_js' configuration option will prevent exploitation. Additionally, securing MQTT broker access with authentication and network controls can reduce exposure. Avoid enabling external JS extensions unless necessary.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
TuranSec
Date Reserved
2026-08-05T12:23:34.967Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a7336e5bf8831d539ed9267

Added to database: 08/05/2026, 13:13:09 UTC

Last enriched: 08/05/2026, 13:29:28 UTC

Last updated: 08/06/2026, 00:30:14 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses