/

CVE-2026-59178

Severity:

CRITICAL RISK

(9.8)

Missing Authentication (CWE-306) in ESPHome Dashboard

CVE-2026-59178

Awaiting Analysis

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Unauthenticated access to the ESPHome dashboard

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An environment-variable compatibility flaw in the ESPHome Device Builder Dashboard can remove authentication after an upgrade when credentials use the legacy USERNAME and PASSWORD names.

When this occurs, anyone who can reach the dashboard port may access the interface without credentials, potentially exposing administrative functionality and connected device controls.

Affected context

The issue occurs in ESPHome Device Builder Dashboard deployments that:

  • Protect the dashboard using the legacy USERNAME and PASSWORD environment variables
  • Transition to versions that recognize only ESPHOME_USERNAME and ESPHOME_PASSWORD
  • Expose the dashboard port to users or networks that are not fully trusted

Instances already configured with the newer variable names, or instances whose dashboard port is not reachable by untrusted parties, have a reduced exposure.

Exploit preconditions

  • Attack surface: The ESPHome dashboard HTTP service and its listening port
  • Required access: Network reachability to the dashboard; no valid credentials may be required when the issue is triggered
  • Trigger point: Dashboard startup after credentials are supplied only through the legacy environment-variable names
  • Why exploitation is possible: The renamed variables are not recognized, causing a previously protected dashboard to start without authentication rather than preserving the existing credential configuration

Why this happens

The root cause is an authentication configuration compatibility failure mapped to CWE-306: Missing Authentication for Critical Function.

The dashboard changed the names of the environment variables used to load credentials but removed compatibility handling for the documented legacy names. As a result, an authentication control that had been configured by the operator was silently lost during transition. The insecure pattern is treating an unrecognized credential configuration as equivalent to an intentionally unauthenticated deployment without a fail-safe or migration path.

Potential impact

  • An attacker could access the dashboard without authentication
  • An attacker may view or modify ESPHome device configurations
  • An attacker could trigger administrative or device-management actions
  • Sensitive deployment details, network information, or secrets could be exposed
  • Compromised dashboard access could support further attacks against connected home or IoT devices

General mitigation guidance

Mitigation focuses on preserving authentication across configuration changes and reducing dashboard exposure.

Common defensive patterns include:

  • Use the current, product-specific credential environment variables consistently
  • Treat legacy credential names as an explicit migration case rather than silently disabling authentication
  • Require username and password values as a complete pair, rejecting incomplete configurations
  • Fail closed when authentication settings are missing, ambiguous, or inconsistent
  • Restrict dashboard binding and network exposure to trusted administrative networks
  • Apply network segmentation and access controls around home-management services
  • Run startup checks that clearly report whether authentication is enabled
  • Store credentials through controlled secret-management mechanisms instead of broadly inherited environment variables
  • Grant the dashboard only the privileges needed to manage the intended devices

How teams detect issues like this

Organizations can detect this condition through:

  • Configuration reviews that identify legacy or missing credential environment variables
  • Deployment-policy checks requiring product-specific authentication variables
  • Static and infrastructure-as-code analysis for dashboards exposed on unrestricted interfaces
  • Startup-log monitoring for unauthenticated-mode banners or authentication mismatch errors
  • Network scans that identify dashboard ports reachable from untrusted segments
  • Integration tests that verify authentication remains enabled after configuration migrations
  • Code review checks for credential-renaming changes that lack compatibility handling or fail-closed behavior

Automated policy and code-review tools can help enforce required authentication settings before deployment.

Sources

SourceLink
github.comgithub.com/esphome/device-builder/commit/9e294f729c3eb7334bb57b9fc49b75b728052f52
github.comgithub.com/esphome/device-builder/pull/1625
github.comgithub.com/esphome/device-builder/releases/tag/1.0.12
github.comgithub.com/esphome/device-builder/security/advisories/GHSA-rrxg-g2pf-6hh4

Frequently asked

questions

Yes, when the dashboard port is reachable over a network and the affected configuration causes authentication to be disabled. Remote exploitation does not require valid dashboard credentials in that state.

The attacker needs network connectivity to the ESPHome dashboard. They do not need access to the host environment variables if the dashboard has already started without authentication.

Configure the dashboard with the current product-specific credential variable names, verify that both credentials are accepted as a pair, and confirm from startup logs and an authenticated access test that protection is enabled.

Treat credential renames as security-sensitive migrations, preserve compatibility where appropriate, fail closed for missing or ambiguous settings, restrict service exposure, and monitor for unauthenticated startup states.

Find out what's already
exploitable in your codebase.