CVE-2025-62172: Home Assistant vulnerable to Stored XSS in Energy dashboard from Energy Entity Name

Published Oct 14, 2025
·
Updated

Summary An authenticated party can add a malicious name to the Energy entity, allowing for Cross-Site Scripting attacks against anyone who can see the Energy dashboard, when they hover over any information point (The blue bar in the picture below) <img width="955" height="568" alt="1cens" src="https://github.com/user-attachments/assets/ed855216-c306-4b50-affc-cda100e72b74" />

An alternative, and more impactful scenario, is that the entity gets a malicious name from the provider of the Entity (in this case the energy provider: Tibber), and gets exploited that way, through the default name.

Details The incriminating entity in my scenario is from the Tibber integration, as shown in the screenshot below: <img width="822" height="309" alt="2cens" src="https://github.com/user-attachments/assets/d0d5a7aa-8d0c-4dcb-825b-e4cb8ea8885b" />

The exploit should be possible regardless of the Energy integration, as the user can name the entity themselves and as such pick a malicious name. The default name given by the Energy integration can also be taken directly from their system, and be vulnerable that way. The execution happens within the energy dashboard, when hovering over a data point:

<img width="1547" height="575" alt="image" src="https://github.com/user-attachments/assets/6e5880c2-cde4-4a96-b573-73756c69d0d8" />

Update found after issue was reported: I found that the issue presents itself for any entity with a html-entity in the name, which is included and rendered in the graph view. Following is an example for a speaker: <img width="423" height="96" alt="11cens" src="https://github.com/user-attachments/assets/3b4d43dd-d9e0-466b-85c0-277af3195acf" />

Source code The relevant source code is added in a comment, but copy pasted here as well:

The offending line of code rendering the payload appears to be: https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts#L110 Where the parameter marked with bold and italic is the vulnerable value: return \${title}${params.marker} ${params.seriesName}: ${value}\;

From the trace below, we can see that the only change done to the friendlyname of an entity is replacing underscores with spaces (computeObjectId(entityId).replace(//g, " ")). We can also determine that any power entity will have it's name used if there is one, and fall back to the friendly name if it cannot find one: data.push({ id: ${compare ? "compare-" : ""}${statId}-${type}, type: "bar", cursor: "default", name: type in labels ? labels[type] : getStatisticLabel( this.hass, statId, statisticsMetaData[statId] ), (https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts#L467-L478)

The value comes from:

1. https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts#L467-L478 (This is the relevant call: getStatisticLabel(this.hass, statId, statisticsMetaData[statId];)

2. getStatisticLabel is defined here: https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/data/recorder.ts#L329-L339 (This is the relevant call: computeStateName(entity);)

3. computeStateName is defined here: https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/common/entity/computestatename.ts

-----

PoC 1. Set up a new energy provider with a price sensor. 2. Give the price sensor a malicious name <img width="814" height="100" alt="4cens" src="https://github.com/user-attachments/assets/64bf7a00-47a2-46db-ae0f-b93e328837d2" /> <img width="459" height="325" alt="5cens" src="https://github.com/user-attachments/assets/e43e1c4f-bb4e-45b4-b46a-a6fc32b689ba" />

3. Configure the energy dashboard to get data from the price sensor <img width="582" height="394" alt="image" src="https://github.com/user-attachments/assets/74c99ab8-0842-4c1b-b2e9-994827d89609" />

<img width="1678" height="241" alt="7cens" src="https://github.com/user-attachments/assets/24f4c83a-3c0a-4dea-9e1c-9c6b070fb28f" />

<img width="329" height="497" alt="8cens" src="https://github.com/user-attachments/assets/ccb7f90a-4745-4fb4-9efa-f30b3324cb3a" />

5. Look at the data and hover the data point for code to execute. (You may have to trigger data ingestion or add a false data point to be able to hover a data point when testing, you need at least one datapoint to trigger the vulnerability) <img width="1547" height="575" alt="9cens" src="https://github.com/user-attachments/assets/087cdf78-a503-427d-8e0c-bb5db24de5c8" />

Impact It is possible to exploit this over the internet, by using an energy provider, like Tibber, with a malicious name, and relying on the default naming in Home Assistant being used. This is actually how I found this bug: <img width="453" height="152" alt="10cens" src="https://github.com/user-attachments/assets/45451efb-2688-4589-a988-88d1fc0b4e25" />

This means that a malicious employee or someone with access to your electricity provider can attack your Home Assistant instance from your electricity provider. I am unsure if you consider this a sanitization and escaping issue in the respective integrations or not, but I believe a central fix in the form of fixing the Energy Dashboard is more appropriate, rather than to rely on every integration properly handling user input.

Other sources

Home Assistant is open source home automation software that puts local control and privacy first. In versions 2025.1.0 through 2025.10.1, the energy dashboard is vulnerable to stored cross-site scripting. An authenticated user can inject malicious JavaScript code into an energy entity's name field, which is then executed when any user hovers over data points in the energy dashboard graph tooltips. The vulnerability exists because entity names containing HTML are not properly sanitized before being rendered in graph tooltips. This could allow an attacker with authentication to execute arbitrary JavaScript in the context of other users' sessions. Additionally, if an energy provider (such as Tibber) supplies a malicious default name for an entity, the vulnerability can be exploited without direct user action when the default name is used. This issue has been patched in version 2025.10.2. No known workarounds exist.

MITRE

Affected Software

2 affected componentsFixes available
Home Assistant Home Assistant>=2025.1.0<=2025.10.1
pip/homeassistant>=2025.1.0<=2025.10.1
2025.10.2

Event History

Oct 14, 2025
CVE Published
via MITRE·03:14 PM
Data Sourced
via MITRE·03:14 PM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:36 PM
Data Sourced
via GitHub·07:36 PM
DescriptionWeaknessAffected Software
Jul 8, 57776
Event
via NVD·10:42 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-62172?

CVE-2025-62172 is classified as a medium severity vulnerability due to potential exploitation by authenticated users.

2

How do I fix CVE-2025-62172?

To fix CVE-2025-62172, upgrade Home Assistant to version 2025.10.2 or later.

3

Who is affected by CVE-2025-62172?

CVE-2025-62172 affects authenticated users of Home Assistant versions 2025.1.0 through 2025.10.1.

4

What type of vulnerability is CVE-2025-62172?

CVE-2025-62172 is a stored cross-site scripting vulnerability.

5

What can an attacker do with CVE-2025-62172?

An attacker with access can inject malicious JavaScript code into the energy dashboard, potentially leading to unauthorized actions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203