top of page
perceptive_background_267k.jpg

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

Click to open the original link from this advisory

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:

Related CVE's:

Related threat actors:

IOC's:

This article was created with the assistance of AI technology by Perceptive.

© 2025 by Perceptive Security. All rights reserved.

email: info@perceptivesecurity.com

Disclaimer: Deze website toont informatie afkomstig van externe bronnen. Perceptive aanvaardt geen verantwoordelijkheid voor de inhoud, juistheid of volledigheid van deze informatie.

bottom of page