Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconGain local filesystem write access
-
DeliveryStage malicious git repo with backdoored Python component
-
ExploitCraft YAML with file:// external_components URL
-
InstallVictim runs esphome config/run
-
C2file:// URI bypasses cv.url() operator-precedence bug
-
ExecuteESPHome git-clones local malicious repo and imports component
-
ImpactArbitrary Python executes as esphome process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires three concrete, simultaneous conditions. First, the attacker must be able to write a malicious git repository to a known or predictable path on the local filesystem of the machine running ESPHome - this rules out purely remote attackers and requires at minimum local write access to a directory such as /tmp, a home directory share, or a mounted network volume. Second, the attacker must control or inject content into an ESPHome YAML configuration file that will be processed by the target machine, specifically crafting an external_components block with a git source whose url: field contains a file:// URI pointing to the staged repository. Third, a user or automated pipeline must actively invoke an esphome subcommand that triggers YAML parsing and component loading - such as |
| Impact | The vendor-provided CVSS 8.6 (AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H) reflects a meaningful but constrained threat. The local attack vector (AV:L) is the primary limiting factor: exploitation requires the attacker to stage a malicious git repository on the target's local filesystem, which presupposes some prior foothold or filesystem write access - making PR:N arguably overgenerous; PR:L better reflects the realistic requirement. The Changed Scope (S:C) and full impact triad (C:H/I:H/A:H) accurately capture that successful exploitation yields arbitrary Python code execution, escaping the validator's security context entirely. No EPSS score, CISA KEV listing, or public proof-of-concept was present in the input data, and no vendor advisory or patched release has been identified. Real-world risk is highest in shared developer environments and CI/CD pipelines where ESPHome YAML files are sourced from untrusted or externally shared repositories and processed automatically; isolated hobbyist workstations where the operator controls all YAML input face substantially lower practical risk. The absence of a network attack vector prevents mass-exploitation scenarios and meaningfully suppresses the real-world exploitability compared to the raw CVSS score suggests. |
| Exploit ScenarioDerived | An attacker with local filesystem write access creates a malicious git repository at a controlled path such as /tmp/evil-components/, embedding arbitrary Python code in a component __init__.py file. The attacker delivers a crafted ESPHome YAML configuration - via a shared project repository, a pull request to a team repo, or a social-engineering download - containing an external_components block with |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 05, 2026
Remote code execution in ESPHome through 2026.7.0-dev allows any attacker who can supply a crafted YAML configuration to execute arbitrary Python code on the machine that processes it. The vulnerability is an operator-precedence bug in the cv.url() validator: Python's 'and' binding tighter than 'or' causes any file:// URI to unconditionally pass validation, bypassing the intended network-URI-only restriction on the external_components git source URL field. ESPHome then invokes git clone against the attacker-supplied local path and loads the resulting repository into Python's import machinery, yielding full code execution with the privileges of the esphome process; no public exploit has been identified at time of analysis.
RemediationAI
No vendor-released patch version has been identified at time of analysis - the provided references point only to the source repository and the vulnerable file, not to a fix commit or tagged release. The correct code fix requires adding explicit parentheses to restore intended logic, either as if parsed.scheme and (parsed.netloc or parsed.scheme == 'file'): return parsed.geturl() to permit file:// URIs that include a netloc, or more defensively by explicitly rejecting the file:// scheme in the external_components URL validator regardless of netloc. As immediate compensating controls, operators should audit all ESPHome YAML configurations for external_components blocks containing url: fields referencing file:// or local paths using grep -r 'file://' *.yaml; automated pre-processing in CI/CD pipelines can enforce rejection of such patterns before esphome is invoked. Restricting filesystem write access for untrusted users to directories outside the esphome working path limits an attacker's ability to stage a malicious repository in a reachable location. Running esphome inside a Docker container with a read-only volume mount for the configuration directory and no access to host filesystem paths prevents local file:// traversal from reaching attacker-controlled content, at the cost of requiring container orchestration overhead.
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
ESPHome (cpe:2.3:a:esphome:esphome:*:*:*:*:*:*:*:*) is a Python-based firmware build system for ESP8266/ESP32 microcontrollers widely used in the Home Assistant ecosystem. Its external_components YAML directive allows sourcing custom firmware components from a remote git URL, which is validated by the cv.url() function in esphome/config_validation.py before being passed to git clone. The vulnerable expression - if parsed.scheme and parsed.netloc or parsed.scheme 'file': return parsed.geturl() - evaluates as (parsed.scheme and parsed.netloc) or (parsed.scheme 'file') due to Python operator precedence, meaning any URL whose scheme is literally 'file' passes validation regardless of whether netloc is populated. This is a textbook CWE-184 (Incomplete List of Disallowed Inputs): the validator fails to exclude the file:// input class it was designed to reject. Because git natively supports file:// cloning and ESPHome's component loader unconditionally adds the cloned path to Python's sys.path and import machinery, the trust boundary between external URL validation and local code execution is completely bridged.
Know when Esphome 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:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
PR:L replaces the vendor's PR:N because staging a malicious local git repository requires filesystem write access, implying at minimum low-privilege local access; all other vendor metrics are consistent with the description.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
DescriptionCVE.org
ESPHome through 2026.7.0-dev contains an operator-precedence bug in the cv.url() validator in esphome/config_validation.py: if parsed.scheme and parsed.netloc or parsed.scheme == "file": return parsed.geturl(). Because and binds tighter than or, any file: URI passes validation regardless of netloc. This validator gates the url: field of the external_components YAML directive's git source schema, which is passed to git clone (git supports file:// natively). A crafted external_components block with url: "file:///attacker/repo" clones an attacker-controlled local path, which is then added to Python's import machinery via ESPHome's component loader, executing arbitrary Python code when the YAML configuration is processed (e.g. via esphome config/esphome run).
Executive ViewAI
ESPHome automation platform versions through 2026.7.0-dev are vulnerable to remote code execution via maliciously crafted configuration files, allowing attackers to gain full system compromise with ESPHome process privileges. The vulnerability results from a configuration validation flaw that permits local file-based code injection, exposing automation infrastructure and connected systems across the organization. No vendor patch is currently available, requiring immediate interim mitigations to prevent potential compromise of mission-critical systems.
Disable external_components feature if operationally feasible; implement allowlist-based YAML schema validation for configuration sources; restrict git clone operations to whitelisted repositories; implement network segmentation isolating ESPHome systems from production infrastructure; enable comprehensive audit logging for configuration changes and process execution; restrict configuration submission to authenticated, authorized users; consider air-gapping critical automation systems until patched versions are verified and deployed.
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
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
ESPHome is a system to control microcontrollers remotely through Home Automation systems. Rated high severity (CVSS 8.1)
ESPHome is a system to control your ESP8266/ESP32. Rated high severity (CVSS 8.8), this vulnerability is remotely exploi
ESPHome is a system to control your ESP8266/ESP32 for Home Automation systems. Rated high severity (CVSS 8.7), this vuln
ESPHome versions 2025.9.0 through 2025.12.6 are vulnerable to a denial-of-service attack via integer overflow in the API
ESPHome is a system to control the ESP8266/ESP32. Rated high severity (CVSS 7.5), this vulnerability is remotely exploit
ESPHome's built-in web server unconditionally leaks plaintext passwords stored in password-mode text entities to any una
EUVD-2026-53344
GHSA-2g7j-rv69-9w67
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB