ESPHome through 2026.7.0-dev contains an operator-precedence bug in the cv.url() validator in esphome/configvalidation.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 externalcomponents 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).
{
"cna_assigner": "TuranSec",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71259.json",
"cwe_ids": [
"CWE-184"
]
}{
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "2026.7.0"
},
{
"fixed": "2026.7.0-dev"
}
],
"source": [
"AFFECTED_FIELD",
"DESCRIPTION"
]
}