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="1_cens" 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.
The incriminating entity in my scenario is from the Tibber integration, as shown in the screenshot below: <img width="822" height="309" alt="2_cens" 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="1545" height="571" alt="image" src="https://github.com/user-attachments/assets/46dc7f00-4593-4271-8c3f-4c02b021ff2b" />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="11_cens" src="https://github.com/user-attachments/assets/3b4d43dd-d9e0-466b-85c0-277af3195acf" />
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:...
2025.1.02025.1.12025.1.22025.1.32025.1.42025.10.02025.10.0b02025.10.0b12025.10.0b22025.10.0b4+124 more2025.10.2Exploitability
AV:NAC:LAT:NPR:LUI:AVulnerable System
VC:HVI:HVA:HSubsequent System
SC:HSI:HSA:HCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P