CVE-2026-30332
TOCTOU Race Condition in Balena Etcher Allows Privilege Escalation
Publication date: 2026-04-02
Last updated on: 2026-04-02
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| balena | etcher | to 2.1.4 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-367 | The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. |
Attack-Flow Graph
AI Powered Q&A
How can this vulnerability impact me? :
This vulnerability allows an attacker who already has medium integrity user privileges on the affected Windows system to escalate their privileges to high integrity (administrator level).
By exploiting the TOCTOU race condition during the flashing process in Balena Etcher, the attacker can execute arbitrary code with elevated privileges.
- Creation of a new local administrator account without the legitimate user's knowledge.
- Execution of arbitrary malicious commands with elevated privileges.
- Potential full system compromise due to privilege escalation.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not explicitly address how the CVE-2026-30332 vulnerability in Balena Etcher affects compliance with common standards and regulations such as GDPR or HIPAA.
Can you explain this vulnerability to me?
CVE-2026-30332 is a Time-of-Check to Time-of-Use (TOCTOU) race condition vulnerability in Balena Etcher for Windows versions prior to 2.1.4. The vulnerability occurs because Etcher creates a temporary .cmd script file in a user-writable directory and later executes it with elevated privileges via Windows User Account Control (UAC).
There is a time gap between the creation of the .cmd file and its execution. During this window, an attacker with medium integrity privileges can monitor the temporary directory and replace the legitimate script with a malicious payload. Since Etcher does not verify the script's integrity before execution, the malicious commands run with elevated (high integrity) privileges.
A proof-of-concept exploit involves a Python script that watches for the creation of the .cmd file and replaces it with a payload that creates a new local administrator account, effectively escalating privileges on the affected system.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring the creation and modification of temporary .cmd script files in the directory used by Balena Etcher during the flashing process, specifically: C:\Users\<username>\AppData\Local\Temp\etcher\.
A proof-of-concept Python script exists that continuously monitors this directory for the creation of .cmd files with the prefix "balena-etcher-electron-" and detects if these files are replaced or modified before execution.
While no specific built-in commands are provided, you can use file system monitoring tools or scripts to watch for unexpected changes or replacements of these .cmd files during the flashing process.
- Use a Python script or similar file monitoring tool to watch the Etcher temp directory for creation and modification of .cmd files.
- Check for the presence of unexpected new local administrator accounts (e.g., "exploitUser") that may have been created by a malicious payload.
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to update Balena Etcher to version 2.1.4 or later, where this TOCTOU vulnerability has been fixed.
Until the update can be applied, avoid running Balena Etcher on Windows systems with untrusted or potentially compromised user accounts, as the vulnerability requires medium integrity user privileges to exploit.
Additionally, monitor the temporary directory used by Etcher for suspicious file modifications and watch for unexpected creation of new administrator accounts.
Ensure that user accounts have the minimum necessary privileges and consider restricting access to the temporary directory if possible.