Miggo Logo

CVE-2025-62172: Home Assistant has Stored XSS vulnerability in Energy dashboard from Energy Entity Name

N/A

CVSS Score

Basic Information

EPSS Score
-
Published
10/14/2025
Updated
10/14/2025
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
homeassistantpip>= 2025.1.0, <= 2025.10.12025.10.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a stored XSS in the Energy dashboard of Home Assistant. The root cause is the lack of output sanitization when rendering entity names in graph tooltips. The analysis of the provided information, including the detailed vulnerability description and source code links, allowed for the identification of the key functions involved in this vulnerability.

The primary vulnerable function is HuiEnergyDevicesGraphCard.updated, where the seriesName parameter, containing the malicious entity name, is directly embedded into the tooltip's HTML. The HuiEnergyUsageGraphCard.updated function is also critical as it is responsible for fetching this malicious name by calling getStatisticLabel. The getStatisticLabel and computeStateName functions are part of the data propagation chain, providing the unsanitized data that ultimately gets rendered.

An engineer looking to determine if their environment is affected should look for custom entity names containing HTML or script tags, especially for entities displayed on the Energy dashboard. Any interaction with the graphs for these entities (hovering over data points) would trigger the vulnerability. The identified functions would appear in a runtime profile during such an interaction.

Vulnerable functions

HuiEnergyDevicesGraphCard.updated
src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts
This function renders the tooltip for the energy devices graph. The `params.seriesName` is directly included in the HTML output without any sanitization, which allows for the execution of injected scripts.
HuiEnergyUsageGraphCard.updated
src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts
This function prepares the data for the energy usage graph. It calls `getStatisticLabel` to retrieve the entity name, which is then used as the `seriesName` in the tooltip. This function is responsible for passing the tainted data to the rendering component.
getStatisticLabel
src/data/recorder.ts
This function is a helper that retrieves the state name of an entity. It calls `computeStateName` and passes the result up the call stack, eventually to the tooltip renderer. It is part of the data flow of the vulnerability.
computeStateName
src/common/entity/compute_state_name.ts
This function computes the display name of an entity, often using the `friendly_name` attribute. In the context of this vulnerability, it retrieves the malicious name that was previously stored.

WAF Protection Rules

WAF Rule

### Summ*ry *n *ut**nti**t** p*rty **n *** * m*li*ious n*m* to t** *n*r*y *ntity, *llowin* *or *ross-Sit* S*riptin* *tt**ks ***inst *nyon* w*o **n s** t** *n*r*y **s**o*r*, w**n t**y *ov*r ov*r *ny in*orm*tion point (T** *lu* **r in t** pi*tur* **low

Reasoning

T** vuln*r**ility is * stor** XSS in t** *n*r*y **s**o*r* o* *om* *ssist*nt. T** root **us* is t** l**k o* output s*nitiz*tion w**n r*n**rin* *ntity n*m*s in *r*p* tooltips. T** *n*lysis o* t** provi*** in*orm*tion, in*lu*in* t** **t*il** vuln*r**ili