Vulnerability GHSA-wx4m-69m9-gx3m

Critical
CRITICAL RISK
CVSS Score: 9.5
Score Range: 9.0–10.0
Critical severity vulnerabilities (CVSS 9.0–10.0). These represent the highest impact issues.
8 days ago
September 22, 2026 at 08:40 PM UTC
Home Assistant: XSS in Statistics Graph Card
0.7.0rc1 - 2026.7.0b4
0.7.0rc1 - 2026.7.0b4

Summary

Home Assistant: XSS in Statistics Graph Card

Details

Summary

An authenticated party can add a malicious name to any statistics-capable entity, allowing for Cross-Site Scripting attacks against anyone who views a Statistics Graph card containing that entity, when they hover over any data point on the chart.

Payload image

Payload triggering image

An alternative, and more impactful scenario, is that the entity gets a malicious name from the provider of the integration (e.g. Tibber, Shelly, or any HACS integration), and is exploited that way through the default name — without requiring any direct access to the Home Assistant instance. This is the same supply-chain vector as CVE-2025-62172.

Details

The Statistics Graph card renders entity names in ECharts tooltips as raw HTML. The offending line is in src/components/chart/statistics-chart.ts:

https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/components/chart/statistics-chart.ts#L236

Where param.seriesName is interpolated verbatim into the returned HTML string:

return `${time}${param.marker} ${param.seriesName}: ${value}`;

No call to filterXSS() is made — unlike the Energy dashboard chart, which was patched as part of CVE-2025-62172:

// FIXED in energy-chart-options.ts:268
return `${param.marker} ${filterXSS(param.seriesName!)}: ...`;

The statistics-chart component was not updated when the Energy chart was patched, leaving the same class of vulnerability in place.

The existing entity and payload used for CVE-2025-62172 is also a valid exploit for this vulnerability: image

The name value flows through the following chain:

  1. name is set from getStatisticLabel(this.hass, statistic_id, meta): https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/components/chart/statistics-chart.ts#L411

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

  3. computeStateName is defined here — no HTML encoding is applied: https://github.com/home-assistant/frontend/blob/c13a80ce5e7ae39f0262444e2b6295a074a96732/src/common/entity/compute_state_name.ts

The only transformation applied to the name is replacing underscores with spaces (computeObjectId(entityId).replace(/_/g, " ")), which does not prevent HTML injection.

NB: Do note that only the fields Mean, State, Sum and Change are vulnerable. The top 3 (Min, Max, Mean) or the bottom 3 (State, Sum, Change) are selected by default though, making it vulnerable by default: image

Another requirement is that the Chart Type is of type Line, not Bar, which is also the default: image

Impact

The vulnerability can be exploited remotely via the supply-chain vector: any integration that automatically names entities (e.g. energy providers like Tibber) could deliver the payload without requiring the attacker to have any account on the target Home Assistant instance. This mirrors the exact attack path described in CVE-2025-62172. The most likely exploit is also through energy providers due to them providing multiple entities compatible with statistic graphs.

Compared to CVE-2025-62172, this has the requirement that you add a Statistics Graph to your dashboard (or somehow view the entity in a Statistics Graph through other means, if such a method exists). Otherwise the attack flow is identical. Suggested CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

The root cause — missing filterXSS() on param.seriesName — is identical to the already-fixed Energy dashboard. The Statistics Graph card, which uses a shared statistics-chart component, was not included in the previous fix scope.

Credit: Robin Lunde - https://robinlunde.com

Impacted packages

Timeline

Published
8 days ago
September 22, 2026 at 08:40 PM UTC
Fixed (2026.7.0)
3 months ago
July 01, 2026 at 06:10 PM UTC
Last Modified
8 days ago
September 22, 2026 at 09:00 PM UTC