Nixpkgs security tracker

Login with GitHub

Details of issue NIXPKGS-2026-2362

NIXPKGS-2026-2362
published 10 hours ago
ESPHome external_components file:// Scheme Validation Bypass Leading to Remote Code Execution
Permalink CVE-2026-71259
8.6 HIGH
  • CVSS version (CVSS): 3.1
  • Attack Vector (AV): Local (L)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): Required (R)
  • Scope (S): Changed (C)
  • Confidentiality (C): High (H)
  • Integrity (I): High (H)
  • Availability (A): High (H)
  • Modified Attack Vector (MAV): Local (L)
  • Modified Attack Complexity (MAC): Low (L)
  • Modified Privileges Required (MPR): None (N)
  • Modified User Interaction (MUI): Required (R)
  • Modified Confidentiality (MC): High (H)
  • Modified Scope (MS): Changed (C)
  • Modified Integrity (MI): High (H)
  • Modified Availability (MA): High (H)
updated 10 hours ago by @LeSuisse Activity log
  • Created suggestion
  • @LeSuisse ignored
    8 packages
    • python313Packages.aioesphomeapi
    • python313Packages.bleak-esphome
    • python314Packages.aioesphomeapi
    • python314Packages.bleak-esphome
    • python313Packages.esphome-glyphsets
    • python314Packages.esphome-glyphsets
    • python313Packages.esphome-dashboard-api
    • python314Packages.esphome-dashboard-api
  • @LeSuisse ignored reference https://g…
  • @LeSuisse accepted
  • @LeSuisse published on GitHub
ESPHome external_components file:// Scheme Validation Bypass Leading to Remote Code Execution

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`).

Affected products

esphome
  • =<2026.7.0

Matching in nixpkgs

Ignored packages (8)

Package maintainers