Skip to main content

ESPHome EUVDEUVD-2026-53344

| CVE-2026-71259 HIGH
Incomplete List of Disallowed Inputs (CWE-184)
2026-08-05 TuranSec GHSA-2g7j-rv69-9w67
8.6
CVSS 3.1 · Vendor: TuranSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Gain local filesystem write access
  2. Delivery
    Stage malicious git repo with backdoored Python component
  3. Exploit
    Craft YAML with file:// external_components URL
  4. Install
    Victim runs esphome config/run
  5. C2
    file:// URI bypasses cv.url() operator-precedence bug
  6. Execute
    ESPHome git-clones local malicious repo and imports component
  7. Impact
    Arbitrary 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 esphome config, esphome run, or esphome compile - satisfying the UI:R requirement. What limits exploitation: the local attack vector (AV:L) eliminates unauthenticated remote exploitation; user interaction (UI:R) prevents silent background triggering; the attacker's repository must be staged before the esphome invocation occurs; and YAML files that do not include an external_components directive with a git source url: field are entirely unaffected by this vulnerability.

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 url: 'file:///tmp/evil-components'; when a developer or CI pipeline runs esphome config device.yaml or esphome run device.yaml, cv.url() incorrectly validates the file:// URI, git clones the local malicious repository, and ESPHome's component loader imports and executes the attacker's Python with the full privileges of the invoking process.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

esphome 0 ≤2026.7.0

Affected Packages

euvd esphome no fix

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

Vendor (TuranSec) PRIMARY 8.6 HIGH
AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
vuln.today AI 8.2 HIGH

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.

3.1 AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Medium
popular IoT firmware build tool in Home Assistant and DIY embedded communities
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy