


Perceptive Security
SOC/SIEM Consultancy

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 …
Published:
4 August 2026 at 22:00:00
Alert date:
5 August 2026 at 14:10:56
Source:
nvd.nist.gov
Mobile & IoT, Zero-Day Vulnerabilities, Supply Chain & Dependencies
ESPHome through version 2026.7.0-dev contains an operator-precedence bug in the cv.url() validator within esphome/config_validation.py. The flawed conditional logic allows any file: URI to bypass validation regardless of the netloc field. This validator governs the url: field in the external_components YAML directive's git source schema, which is passed directly to git clone. Because git natively supports file:// URIs, an attacker can craft a malicious YAML configuration with a file:/// URL pointing to an attacker-controlled local repository. When ESPHome processes the configuration (e.g., via esphome config or esphome run), the cloned repository is added to Python's import machinery through ESPHome's component loader. This results in arbitrary Python code execution on the system processing the YAML file. The vulnerability is rooted in a simple but critical logic error where 'and' binds tighter than 'or' in Python, making the file scheme check always evaluate to true.
Technical details
Mitigation steps:
Affected products:
ESPHome 2026.7.0-dev and earlier
Related links:
https://nvd.nist.gov/vuln/detail/CVE-2026-71259
https://github.com/esphome/esphome
https://github.com/esphome/esphome/blob/dev/esphome/config_validation.py
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
