GHSA-46j8-vpx8-6p72
GHSA-46j8-vpx8-6p72 is a Cross-site Scripting (XSS) vulnerability in homeassistant. O3 Security confirms whether GHSA-46j8-vpx8-6p72 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Home Assistant has stored XSS in history-graphs
Real-World Exposure
homeassistantReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The "remaining charge time"-sensor for mobile phones (imported/included from Android Auto it appears) is vulnerable to the same issue as CVE-2025-62172. <img width="431" height="334" alt="image" src="https://github.com/user-attachments/assets/84e0dfad-b986-4e84-ad0e-674c5da88582" /> This also indicates that any sensor showing their name in the history-graph, is likely to be vulnerable to this issue.
Details
Another entity was found which displays the same behavior as in this issue: CVE-2025-62172
The History-graph card will sometimes display the name of the entity it is displaying, when the graph is shown as a line with values on the x and y axis. This appears to be vulnerable to Cross-Site scripting (XSS) as it does not have any output escaping or sanitization.
The PoC in this instance only shows HTML-injection in the form of the <s> -tag being rendered as strike through, but the vulnerability also allows for injecting arbitrary tags which execute JavaScript, like the example given in the PoC description below.
PoC
- Register a new sensor (or device) or change the name of an existing one, which provides a location
- Change the name to something malicious, for example
test <img src=x onerror=alert(document.domain) />For a new entity, it should work when setting the name. For old entities, go here: <img width="1300" height="411" alt="image" src="https://github.com/user-attachments/assets/7dbd9afa-2f4b-4d03-9384-d57c53eaff5c" />
PS: the example pictures show changing the name of the device-tracker entity, which is wrong. Just change the name of the remaining charge time-sensor in order to validate this finding
-
Add a history graph card with the malicious sensor
<img width="696" height="474" alt="image" src="https://github.com/user-attachments/assets/3cda78e6-3db5-4075-8924-ab9fc5759082" /> -
Hover the graph for payload execution
<img width="343" height="196" alt="image" src="https://github.com/user-attachments/assets/99e56169-b06a-4c60-9343-510e5d74af12" />
Impact
The impact of this vulnerability is that a user can target other users of the system and perform account takeover through client side exploitation of XSS.
In the context of this system, I believe the vulnerability to be less impactful than the CVSS metric describes. It is not displayed anywhere by default, it is not natural to display this history graph, and it also has no potential for being imported through seemingly innocent integrations. It also appears to rely on having used/using Android Auto. Other devices which has the same sensor can trigger the same vulnerability, and I expect there to exists cloud-based devices that would enable a threat actor to deliver the payload remotely.
Credit: Robin Lunde - https://robinlunde.com
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | homeassistant | ≥ 2025.02&&< 2026.01 | 2026.01 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for homeassistant. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update homeassistant to 2026.01 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-46j8-vpx8-6p72 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-46j8-vpx8-6p72 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-46j8-vpx8-6p72. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-46j8-vpx8-6p72 in your dependencies?
O3 detects GHSA-46j8-vpx8-6p72 across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.