Vulnerabilities in pkg:pypi/esphome-device-builder

PACKAGE
Advisory Identifier: GHSA-rrxg-g2pf-6hh4
Advisory Summary

CVE-2026-59178 is a CRITICAL (CVSS 9.8) renamed auth env vars silently vulnerability (CWE-306: Missing Authentication for Critical Function) affecting ESPHome Device Builder libraries in the PyPI ecosystem. The issue involves renamed auth env vars silently disable dashboard authentication on upgrade. Remediation is available by upgrading affected packages to version 1.0.12.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/esphome-device-builder

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/esphome-device-builder. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rrxg-g2pf-6hh4 CVE-2026-59178 CRITICAL ESPHome Device Builder: Renamed auth env vars silently disable dashboard authentication on upgrade
GHSA-vv4j-m4vr-f3g6 CVE-2026-59177 HIGH ESPHome Device Builder Dashboard: Unauthenticated dashboard access via the HA add-on ingress site bound to all interfaces

CVE-2026-59178 at a Glance

CVE Identifier CVE-2026-59178
GHSA Identifier GHSA-rrxg-g2pf-6hh4
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product ESPHome Device Builder
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-59178

To remediate this vulnerability, upgrade all affected ESPHome Device Builder dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

esphome-device-builder fixed: 1.0.12
pip install esphome-device-builder>=1.0.12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show esphome-device-builder

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-59178, inspect your installed packages using pip:

pip show esphome-device-builder

Analyze the terminal output to locate any version of ESPHome Device Builder in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.12), your application is affected.

Note: The pip show esphome-device-builder command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In ESPHome Device Builder, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The dashboard reads its authentication credentials from `$ESPHOME_USERNAME` and `$ESPHOME_PASSWORD`. Earlier versions, and the legacy `esphome` dashboard, read the bare `$USERNAME` and `$PASSWORD` instead. When the env vars were renamed the bare names were dropped with no fallback, so an operator who had protected their dashboard with `USERNAME` / `PASSWORD` (as the older getting started guide documented) loses authentication on upgrade and the dashboard starts open to anyone who can reach its port. ## Details Credentials are resolved in `DashboardSettings.parse_args`. The fallback originally read `os.getenv("USERNAME")` and `os.getenv("PASSWORD")`. The env var rename (#265) replaced those with `ESPHOME_USERNAME` / `ESPHOME_PASSWORD` and intentionally removed the bare names, because `$USERNAME` collides with the OS login user on Linux and Windows and reading it on its own would silently promote the shell user to the dashboard username. The rename closed that footgun but introduced a backward compatibility break: a deployment that set only the bare names now resolves to no credentials, `using_password` is false, and the REST auth middleware and the WebSocket login gate are both disabled. The process logs a `WITHOUT AUTHENTICATION` banner at startup, but a container started detached (`docker run -d`) never surfaces it, so the exposure is silent in practice. This reaches users because the `dashboard` subcommand of the `ghcr.io/esphome/esphome` container runs this package: the container pins `esphome-device-builder` and execs it for `dashboard`, inheriting whatever env the operator passed. The standalone Docker path runs without `--ha-addon`, so it is the affected path. Home Assistant add on installs are not affected; they pass `--ha-addon` and authenticate through the supervisor ingress proxy, and do not use these env vars. The rename was tagged as a breaking change but was not surfaced in the 2026.6.0 changelog, so operators had no signal to migrate before upgrading. ## Impact An unauthenticated client with network access to the dashboard port can manage devices, including editing configurations and flashing firmware. Only deployments that relied on the bare `$USERNAME` / `$PASSWORD` env vars for authentication are affected; deployments using `--username` / `--password`, the new `$ESPHOME_*` env vars, or HA add on ingress are not. ## Severity rationale An unauthenticated network client crosses the dashboard's only security boundary, and a client past that boundary has host equivalent capability. ESPHome's [threat model](https://github.com/esphome/device-builder/blob/main/docs/THREAT_MODEL.md) documents that an authenticated dashboard caller can run arbitrary code at compile time and read or write files in the config and data directories, so confidentiality, integrity, and availability are all High, with no credentials, no user interaction, and low attack complexity. The base score is rated for the worst case, an internet reachable dashboard. That worst case is the right anchor here, because this issue only affects operators who had deliberately configured a dashboard password, and setting a password is the control an operator uses precisely when the dashboard is reachable by parties they do not fully trust, including a deployment exposed to the internet or a network segment shared with untrusted devices. For the affected population a trusted network cannot be assumed, so authentication should be restored as urgent. Operational risk is lower for the subset of affected installations that run on a single trusted home or business network behind a firewall, since reaching the dashboard there requires an attacker who is already inside that network. ESPHome is [designed for deployment on trusted networks](https://esphome.io/guides/security_best_practices/) with the network perimeter as the primary defense, so that deployment context reduces real world exposure; it does not lower the base severity, and operators on shared, guest, or internet reachable networks remain at full risk. ## Patches Fixed in 1.0.12. The bare `$USERNAME` / `$PASSWORD` are accepted again as a deprecated fallback so previously protected instances stay protected across the upgrade without operator intervention, with a loud deprecation warning at startup directing operators to rename them to `$ESPHOME_USERNAME` / `$ESPHOME_PASSWORD`. The fallback is gated on `$PASSWORD` being set and is only adopted as a pair, so the OS provided `$USERNAME` is never read on its own and the original collision footgun stays closed. A lone bare `$PASSWORD` with no username still fails loud as a credential mismatch rather than starting unauthenticated. This restores compatibility rather than failing closed on the legacy names, because the priority is that an instance which was protected before the upgrade stays protected without the operator having to act; the deprecation warning plus a future removal handles the migration. Operators should migrate to the `$ESPHOME_*` names. The esphome container delivers the fix in the 2026.6.2 release, which bumps its pinned `esphome-device-builder` version to 1.0.12. ## Workarounds Without upgrading, restore authentication immediately by setting the new env vars to the same values, on any affected version: ``` ESPHOME_USERNAME=<your-username> ESPHOME_PASSWORD=<your-password> ``` Alternatively, do not expose the dashboard port to untrusted networks, and check the startup logs for the `WITHOUT AUTHENTICATION` banner to confirm whether a given instance is currently open. ## References - Original report against the esphome container: GHSA-446m-c8jp-v37m - Env var rename that introduced the regression: esphome/device-builder#265 - 2026.6.0 changelog (breaking change was not documented): https://esphome.io/changelog/2026.6.0 - Old setup documentation that used the bare names: https://esphome.io/guides/getting_started_command_line

CVE-2026-59178 Affected ESPHome Device Builder Versions

1 component(s)
Fixed Versions:
1.0.12
Product / Package Ecosystem Affected Versions Fixed Version
esphome-device-builder
PyPI
< 1.0.12
1.0.12

References

Frequently Asked Questions

What is CVE-2026-59178?
CVE-2026-59178 is a security vulnerability in ESPHome Device Builder involving Renamed auth env vars silently disable dashboard authentication on upgrade under CWE-306: Missing Authentication for Critical Function.
Which ESPHome Device Builder versions are affected?
Affected versions include releases prior to 1.0.12 across affected packages: esphome-device-builder.
What version fixes CVE-2026-59178?
Upgrading to 1.0.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is esphome-device-builder affected?
Yes, esphome-device-builder is affected in releases prior to 1.0.12. Upgrade your dependency to 1.0.12 or later.
What is the CVSS score of CVE-2026-59178?
CVE-2026-59178 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-59178?
CVE-2026-59178 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check PyPI dependencies for CVE-2026-59178?
Run the dependency tree command: 'pip show esphome-device-builder'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rrxg-g2pf-6hh4",
  "modified" : "2026-09-14T18:08:57Z",
  "published" : "2026-09-14T18:08:57Z",
  "aliases" : [ "CVE-2026-59178" ],
  "summary" : "ESPHome Device Builder: Renamed auth env vars silently disable dashboard authentication on upgrade",
  "details" : "## Summary\n\nThe dashboard reads its authentication credentials from `$ESPHOME_USERNAME` and `$ESPHOME_PASSWORD`. Earlier versions, and the legacy `esphome` dashboard, read the bare `$USERNAME` and `$PASSWORD` instead. When the env vars were renamed the bare names were dropped with no fallback, so an operator who had protected their dashboard with `USERNAME` / `PASSWORD` (as the older getting started guide documented) loses authentication on upgrade and the dashboard starts open to anyone who can reach its port.\n\n## Details\n\nCredentials are resolved in `DashboardSettings.parse_args`. The fallback originally read `os.getenv(\"USERNAME\")` and `os.getenv(\"PASSWORD\")`. The env var rename (#265) replaced those with `ESPHOME_USERNAME` / `ESPHOME_PASSWORD` and intentionally removed the bare names, because `$USERNAME` collides with the OS login user on Linux and Windows and reading it on its own would silently promote the shell user to the dashboard username.\n\nThe rename closed that footgun but introduced a backward compatibility break: a deployment that set only the bare names now resolves to no credentials, `using_password` is false, and the REST auth middleware and the WebSocket login gate are both disabled. The process logs a `WITHOUT AUTHENTICATION` banner at startup, but a container started detached (`docker run -d`) never surfaces it, so the exposure is silent in practice.\n\nThis reaches users because the `dashboard` subcommand of the `ghcr.io/esphome/esphome` container runs this package: the container pins `esphome-device-builder` and execs it for `dashboard`, inheriting whatever env the operator passed. The standalone Docker path runs without `--ha-addon`, so it is the affected path. Home Assistant add on installs are not affected; they pass `--ha-addon` and authenticate through the supervisor ingress proxy, and do not use these env vars.\n\nThe rename was tagged as a breaking change but was not surfaced in the 2026.6.0 changelog, so operators had no signal to migrate before upgrading.\n\n## Impact\n\nAn unauthenticated client with network access to the dashboard port can manage devices, including editing configurations and flashing firmware. Only deployments that relied on the bare `$USERNAME` / `$PASSWORD` env vars for authentication are affected; deployments using `--username` / `--password`, the new `$ESPHOME_*` env vars, or HA add on ingress are not.\n\n## Severity rationale\n\nAn unauthenticated network client crosses the dashboard's only security boundary, and a client past that boundary has host equivalent capability. ESPHome's [threat model](https://github.com/esphome/device-builder/blob/main/docs/THREAT_MODEL.md) documents that an authenticated dashboard caller can run arbitrary code at compile time and read or write files in the config and data directories, so confidentiality, integrity, and availability are all High, with no credentials, no user interaction, and low attack complexity.\n\nThe base score is rated for the worst case, an internet reachable dashboard. That worst case is the right anchor here, because this issue only affects operators who had deliberately configured a dashboard password, and setting a password is the control an operator uses precisely when the dashboard is reachable by parties they do not fully trust, including a deployment exposed to the internet or a network segment shared with untrusted devices. For the affected population a trusted network cannot be assumed, so authentication should be restored as urgent.\n\nOperational risk is lower for the subset of affected installations that run on a single trusted home or business network behind a firewall, since reaching the dashboard there requires an attacker who is already inside that network. ESPHome is [designed for deployment on trusted networks](https://esphome.io/guides/security_best_practices/) with the network perimeter as the primary defense, so that deployment context reduces real world exposure; it does not lower the base severity, and operators on shared, guest, or internet reachable networks remain at full risk.\n\n## Patches\n\nFixed in 1.0.12. The bare `$USERNAME` / `$PASSWORD` are accepted again as a deprecated fallback so previously protected instances stay protected across the upgrade without operator intervention, with a loud deprecation warning at startup directing operators to rename them to `$ESPHOME_USERNAME` / `$ESPHOME_PASSWORD`. The fallback is gated on `$PASSWORD` being set and is only adopted as a pair, so the OS provided `$USERNAME` is never read on its own and the original collision footgun stays closed. A lone bare `$PASSWORD` with no username still fails loud as a credential mismatch rather than starting unauthenticated.\n\nThis restores compatibility rather than failing closed on the legacy names, because the priority is that an instance which was protected before the upgrade stays protected without the operator having to act; the deprecation warning plus a future removal handles the migration. Operators should migrate to the `$ESPHOME_*` names.\n\nThe esphome container delivers the fix in the 2026.6.2 release, which bumps its pinned `esphome-device-builder` version to 1.0.12.\n\n## Workarounds\n\nWithout upgrading, restore authentication immediately by setting the new env vars to the same values, on any affected version:\n\n```\nESPHOME_USERNAME=<your-username>\nESPHOME_PASSWORD=<your-password>\n```\n\nAlternatively, do not expose the dashboard port to untrusted networks, and check the startup logs for the `WITHOUT AUTHENTICATION` banner to confirm whether a given instance is currently open.\n\n## References\n\n- Original report against the esphome container: GHSA-446m-c8jp-v37m\n- Env var rename that introduced the regression: esphome/device-builder#265\n- 2026.6.0 changelog (breaking change was not documented): https://esphome.io/changelog/2026.6.0\n- Old setup documentation that used the bare names: https://esphome.io/guides/getting_started_command_line",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "esphome-device-builder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/esphome/device-builder/security/advisories/GHSA-rrxg-g2pf-6hh4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/esphome/device-builder/pull/1625"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/esphome/device-builder/commit/9e294f729c3eb7334bb57b9fc49b75b728052f52"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/esphome/device-builder"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/esphome/device-builder/releases/tag/1.0.12"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-14T18:08:57Z",
    "nvd_published_at" : null
  }
}