CVE-2026-33045: Homeassistant Cross-Site Scripting Vulnerability
LOWCVE-2026-33045 is a LOW cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Homeassistant libraries in the PyPI ecosystem. The issue involves home assistant has stored xss in history-graphs. Remediation is available by upgrading affected packages to version 2026.01.
CVE-2026-33045 at a Glance
How to Fix CVE-2026-33045
To remediate this vulnerability, upgrade all affected Homeassistant dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install homeassistant>=2026.01
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show homeassistant
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-33045, inspect your installed packages using pip:
pip show homeassistant
Analyze the terminal output to locate any version of Homeassistant in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.01), your application is affected.
Note: The pip show homeassistant command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Homeassistant, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33045 Affected Homeassistant Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
homeassistant
|
PyPI |
≥ 2025.02
< 2026.01
|
2026.01
|
References
Frequently Asked Questions
What is CVE-2026-33045?
Which Homeassistant versions are affected?
What version fixes CVE-2026-33045?
Is homeassistant affected?
What CWE is associated with CVE-2026-33045?
How can I check PyPI dependencies for CVE-2026-33045?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-46j8-vpx8-6p72",
"modified" : "2026-03-27T21:48:43Z",
"published" : "2026-03-27T20:35:01Z",
"aliases" : [ "CVE-2026-33045" ],
"summary" : "Home Assistant has stored XSS in history-graphs",
"details" : "### Summary\nThe \"remaining charge time\"-sensor for mobile phones (imported/included from Android Auto it appears) is vulnerable to the same issue as CVE-2025-62172.\n<img width=\"431\" height=\"334\" alt=\"image\" src=\"https://github.com/user-attachments/assets/84e0dfad-b986-4e84-ad0e-674c5da88582\" />\nThis also indicates that any sensor showing their name in the history-graph, is likely to be vulnerable to this issue.\n\n### Details\n\nAnother entity was found which displays the same behavior as in this issue: [CVE-2025-62172](https://github.com/home-assistant/core/security/advisories/GHSA-mq77-rv97-285m)\n\n\nThe History-graph card will sometimes display the name of the entity it is displaying, when the graph is shown as a line with values on the x and y axis. This appears to be vulnerable to Cross-Site scripting (_XSS_) as it does not have any output escaping or sanitization.\n\nThe PoC in this instance only shows HTML-injection in the form of the `<s>` -tag being rendered as strike through, but the vulnerability also allows for injecting arbitrary tags which execute JavaScript, like the example given in the PoC description below.\n\n\n### PoC\n1. Register a new sensor (or device) or change the name of an existing one, which provides a location\n2. Change the name to something malicious, for example `test <img src=x onerror=alert(document.domain) />`\n For a new entity, it should work when setting the name. For old entities, go here:\n<img width=\"1300\" height=\"411\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7dbd9afa-2f4b-4d03-9384-d57c53eaff5c\" />\n<img width=\"1383\" height=\"885\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c4cfba2e-e2d8-4817-92fe-f17ba7877e27\" />\n<img width=\"387\" height=\"436\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c40e986d-20ca-416e-bcdb-ca1d3afa77a4\" />\n<br>\n<img width=\"392\" height=\"515\" alt=\"image\" src=\"https://github.com/user-attachments/assets/623fcf8c-eef1-4b17-853d-0ff5440aecaa\" />\n\n**PS: the example pictures show changing the name of the device-tracker entity, which is wrong. Just change the name of the `remaining charge time`-sensor in order to validate this finding**\n\n3. Add a history graph card with the malicious sensor\n<img width=\"696\" height=\"474\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3cda78e6-3db5-4075-8924-ab9fc5759082\" />\n\n5. Hover the graph for payload execution\n<img width=\"343\" height=\"196\" alt=\"image\" src=\"https://github.com/user-attachments/assets/99e56169-b06a-4c60-9343-510e5d74af12\" />\n\n\n### Impact\n\nThe impact of this vulnerability is that a user can target other users of the system and perform account takeover through client side exploitation of XSS.\n\nIn the context of this system, I believe the vulnerability to be less impactful than the CVSS metric describes. It is not displayed anywhere by default, it is not natural to display this history graph, and it also has no potential for being imported through seemingly innocent integrations. It also appears to rely on having used/using Android Auto. Other devices which has the same sensor can trigger the same vulnerability, and I expect there to exists cloud-based devices that would enable a threat actor to deliver the payload remotely.\n\nCredit: Robin Lunde - [https://robinlunde.com](https://robinlunde.com)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "homeassistant"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2025.02"
}, {
"fixed" : "2026.01"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/home-assistant/core/security/advisories/GHSA-46j8-vpx8-6p72"
}, {
"type" : "WEB",
"url" : "https://github.com/home-assistant/core/security/advisories/GHSA-mq77-rv97-285m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33045"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/home-assistant/core"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-27T20:35:01Z",
"nvd_published_at" : "2026-03-27T20:16:31Z"
}
}