GHSA-rrxg-g2pf-6hh4

Suggest an improvement
Source
https://github.com/advisories/GHSA-rrxg-g2pf-6hh4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-rrxg-g2pf-6hh4/GHSA-rrxg-g2pf-6hh4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-rrxg-g2pf-6hh4
Aliases
Published
2026-09-14T18:08:57Z
Modified
2026-09-14T18:15:04Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
ESPHome Device Builder: Renamed auth env vars silently disable dashboard authentication on upgrade
Details

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 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 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

Database specific
{
    "cwe_ids": [
        "CWE-306"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-09-14T18:08:57Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
}
References

Affected packages

PyPI / esphome-device-builder

Package

Name
esphome-device-builder
View open source insights on deps.dev
Purl
pkg:pypi/esphome-device-builder

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.0.12

Affected versions

0.*
0.1.0b10
0.1.0b11
0.1.0b12
0.1.0b13
0.1.0b14
0.1.0b15
0.1.0b16
0.1.0b17
0.1.0b18
0.1.0b19
0.1.0b20
0.1.0b21
0.1.0b22
0.1.0b23
0.1.0b24
0.1.0b25
0.1.0b26
0.1.0b27
0.1.0b28
0.1.0b29
0.1.0b30
0.1.0b31
0.1.0b32
0.1.0b33
0.1.0b34
0.1.0b35
0.1.0b36
0.1.0b37
0.1.0b38
0.1.0b39
0.1.0b40
0.1.0b41
0.1.0b42
0.1.0b43
0.1.0b44
0.1.0b45
0.1.0b46
0.1.0b47
0.1.0b48
0.1.0b49
0.1.0b50
0.1.0b51
0.1.0b52
0.1.0b53
0.1.0b54
0.1.0b55
0.1.0b56
0.1.0b57
0.1.0b58
0.1.0b59
0.1.0b60
0.1.0b61
0.1.0b62
0.1.0b63
0.1.0b64
0.1.0b65
0.1.0b66
0.1.0b67
0.1.0b68
0.1.0b69
0.1.0b70
0.1.0b71
0.1.0b72
0.1.0b73
0.1.0b74
0.1.0b75
0.1.0b76
0.1.0b77
0.1.0b78
0.1.0b79
0.1.0b80
0.1.0b81
0.1.0b82
0.1.0b83
0.1.0b84
0.1.0b85
0.1.0b86
0.1.0b87
0.1.0b88
0.1.0b89
0.1.0b90
0.1.0b91
0.1.0b92
0.1.0b93
0.1.0b94
0.1.0b95
0.1.0b96
0.1.0b97
0.1.0b98
0.1.0b99
0.1.0b100
0.1.0b101
0.1.0b102
0.1.0b103
0.1.0b104
0.1.0b105
0.1.0b106
0.1.0b107
0.1.0b108
0.1.0b109
0.1.0b110
0.1.0b111
0.1.0b112
0.1.0b113
0.1.0b114
0.1.0b115
0.1.0b116
0.1.0b117
0.1.0b118
0.1.0b119
1.*
1.0.0
1.0.1
1.0.2b1
1.0.2b2
1.0.2b3
1.0.2b4
1.0.3
1.0.4
1.0.5
1.0.6
1.0.7
1.0.8
1.0.9
1.0.10b1
1.0.10b2
1.0.10
1.0.11b1
1.0.11

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-rrxg-g2pf-6hh4/GHSA-rrxg-g2pf-6hh4.json"