Executive brief
Home Assistant is an open-source home automation platform that allows users to manage smart devices and automation through a web dashboard. A vulnerability in the Statistics Graph card component allows attackers to inject malicious code that executes in the browser when users hover over chart data points. An attacker with the ability to set entity names (either through direct access or via a compromised integration) can execute arbitrary JavaScript in the context of other users' Home Assistant instances, potentially stealing credentials, session tokens, or sensitive smart home configuration data.
Technical details
The vulnerability is a Cross-Site Scripting (XSS) flaw in the Statistics Graph card component's tooltip rendering. The vulnerable code in `statistics-chart.ts` directly interpolates the `param.seriesName` field into an HTML string without sanitization: `return \`${time}${param.marker} ${param.seriesName}: ${value}\`;`. The entity name flows from user-controlled or integration-provided entity metadata through `getStatisticLabel()` and `computeStateName()` without HTML encoding. An authenticated attacker can create a malicious entity name containing HTML/JavaScript payload (e.g., `<img src=x onerror=alert(1) />`), and when any user views that entity in a Statistics Graph card and hovers over a data point, the payload executes. The vulnerability particularly impacts users with Statistics Graph cards showing entities from third-party integrations (e.g., energy providers like Tibber), as the malicious name could be injected at the source without requiring account access to the target instance. A patch applying the `filterXSS()` function (similar to the fix for CVE-2025-62172 in the Energy dashboard) is required.
Affected products
- Home Assistant Home Assistant versions prior to patch (CVE-2026-91130)
Timeline
- 2026-09-22: disclosed: GHSA-wx4m-69m9-gx3m advisory published
- 2025: other: Related vulnerability CVE-2025-62172 patched in Energy dashboard but Statistics Graph card left unpatched