Summary
The Home Assistant iOS companion app prior to 2025.5.0 may expose user access tokens over insecure networks due to flawed SSID-based internal URL selection.
When the app cannot resolve any other URL, it falls back to the internal URL regardless of the SSID allowlist, causing sensitive tokens to transit cleartext on untrusted Wi‑Fi.
Affected context
This vulnerability manifests in the Home Assistant iOS companion app when it decides whether to use an internal or external URL based on the current Wi‑Fi SSID.
In environments where the SSID allowlist is intended to restrict use of the internal URL to trusted networks, the app's fallback behavior can still route traffic over the internal URL even on untrusted or insecure networks.
This behavior becomes risky especially on public or poorly secured Wi‑Fi, where network observers may capture cleartext communication containing user tokens.
Exploit preconditions
- Attack surface: Network traffic between the iOS device running Home Assistant and the Home Assistant instance.
- Required access: Ability to monitor or intercept traffic on the Wi‑Fi network (e.g., same public hotspot, compromised router, or malicious access point).
- Trigger point: The app fails to resolve any other URL and automatically falls back to the internal URL, ignoring the SSID allowlist intended for internal-only access.
- Why exploitation is possible: Sensitive tokens are transmitted in a context where the network is not considered secure, and the SSID-based trust boundary is bypassed by fallback logic, aligning with CWE-319 where sensitive information traverses potentially observable channels.
Why this happens
At its core, the issue stems from relying on SSID-based heuristics to determine whether to use an internal URL and then overriding that policy with a permissive fallback.
The SSID allowlist is meant to constrain use of the internal URL to trusted networks, but the app's logic selects the internal URL whenever no other URL can be found, effectively nullifying the intended trust boundary.
This design flaw leads to the cleartext transmission of sensitive tokens over networks that have not been validated as secure, corresponding to CWE-319: Cleartext Transmission of Sensitive Information.
Potential impact
- Attackers on the same insecure Wi‑Fi may capture authentication tokens used by the Home Assistant iOS app.
- Compromise of the user's Home Assistant instance via stolen tokens.
- Unauthorized control of home automation devices and settings.
- Potential pivot to other services integrated with Home Assistant using the compromised account.
General mitigation guidance
Effective mitigation focuses on strengthening how applications decide when to use internal endpoints and how they handle sensitive data over networks.
Recommended patterns include:
- Avoid using SSID alone as a trust signal; combine it with stronger checks such as certificate validation, secure tunnels, or explicit user configuration.
- Ensure that fallback logic never bypasses security policies; if a safe URL cannot be resolved, prefer failing closed rather than sending sensitive data over a potentially unsafe path.
- Use transport-layer protection (e.g., TLS with strict verification) for all token-bearing requests, regardless of whether an internal or external URL is used.
- Minimize long-lived tokens and scope them tightly so that exposure has limited impact.
- Apply least-privilege principles for tokens, ensuring they grant only the minimal access required.
How teams detect issues like this
Detection typically involves a combination of code-level review and network analysis:
- Review application network logic for places where security policies (such as SSID allowlists or network trust decisions) can be overridden by fallback behavior.
- Use static analysis or linters to flag code paths where sensitive tokens or credentials are sent over connections whose security properties are not explicitly verified.
- Inspect configuration handling around internal versus external URLs to ensure no "silent" overrides of user security preferences.
- Perform network traffic captures in test environments to confirm that tokens are always transmitted over properly secured channels and never in cleartext on untrusted networks.

