# CVE-2026-59178: ESPHome Device Builder: Renamed auth env vars silently disable dashboard authentication on upgrade

> Upgrading ESPHome Dashboard silently disables authentication if legacy environment variables are used, exposing the interface to unauthorized access.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Sep 2026
- **Updated:** 14 Sep 2026
- **Also known as:** GHSA-rrxg-g2pf-6hh4, PYSEC-2026-4049

## What is CVE-2026-59178?

CVE-2026-59178 is a critical authentication bypass vulnerability in esphome device-builder, published on 14 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

ESPHome Device Builder Dashboard is a dashboard for the ESPHome home management software. Prior to version 1.0.12, 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. The issue is 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. Without upgrading, restore authentication immediately by setting the new env vars to the same values, on any affected version. 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.

Weakness: CWE-306 (Missing Authentication for Critical Functionality)

## Which versions are affected by CVE-2026-59178?

3 open source packages ship an affected version, including esphome-device-builder.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `esphome-device-builder` | PyPI | All versions | 1.0.12 |
| `esphome-device-builder` | PyPI | All versions | 1.0.12 |
| `esphome-device-builder` | PyPI | All versions | 1.0.12 |

## How do I fix CVE-2026-59178?

Upgrade esphome-device-builder to 1.0.12 or later.

## Is CVE-2026-59178 being exploited?

There is no known exploitation of CVE-2026-59178 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-59178 and fix it if it is affected.

What it is: CVE-2026-59178 is a critical authentication bypass vulnerability in esphome device-builder, published on 14 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-59178 in the wild and no public exploit code.

Affected packages and fixed versions:
- esphome-device-builder (PyPI): affected all versions; fixed in 1.0.12
- esphome-device-builder (PyPI): affected all versions; fixed in 1.0.12
- esphome-device-builder (PyPI): affected all versions; fixed in 1.0.12

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-59178/ (Markdown: https://insights.sbomify.com/CVE-2026-59178/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-59178
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-59178
- OSV: https://osv.dev/vulnerability/CVE-2026-59178

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-59178/
Summaries are generated and may contain mistakes; the official description above is the record.
