# CVE-2026-33045: Home Assistant has stored XSS in history-graphs

> An attacker can inject malicious scripts via mobile phone sensor data in Home Assistant, potentially leading to code execution or account takeover.

- **Severity:** High 7.3 (`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/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 27 Mar 2026
- **Updated:** 1 Apr 2026
- **Also known as:** GHSA-46j8-vpx8-6p72, PYSEC-2026-2516

## What is CVE-2026-33045?

CVE-2026-33045 is a high-severity cross-site scripting vulnerability in home-assistant core, published on 27 Mar 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Home Assistant is open source home automation software that puts local control and privacy first. Starting in version 2025.02 and prior to version 2026.01 the "remaining charge time"-sensor for mobile phones (imported/included from Android Auto it appears) is vulnerable cross-site scripting, similar to CVE-2025-62172. Version 2026.01 fixes the issue.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-33045?

3 open source packages ship an affected version, including homeassistant. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `homeassistant` | PyPI | From 2025.02 | 2026.01 |
| `homeassistant` | PyPI | From 2025.02 | 2026.01 |
| `homeassistant` | PyPI | From 2025.02 | 2026.01 |

Products: Home-Assistant Home-Assistant.

## How do I fix CVE-2026-33045?

Upgrade homeassistant to 2026.01 or later.

## Is CVE-2026-33045 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33045 exists.

## Other vulnerabilities in home-assistant core

- [CVE-2023-27482](https://insights.sbomify.com/CVE-2023-27482/): Auth bypass in core (critical 10.0)
- [CVE-2023-41895](https://insights.sbomify.com/CVE-2023-41895/): Cross-site Scripting via auth_callback login in Home Assistant Core (high 8.8)
- [CVE-2023-41897](https://insights.sbomify.com/CVE-2023-41897/): Lack of XFO header allows clickjacking in Home Assistant Core (high 8.8)
- [CVE-2026-54317](https://insights.sbomify.com/CVE-2026-54317/): Home Assistant: Konnected alarm-panel switch state and zone topology disclosed to unauthenticated actors on the LAN (high 7.6)
- [CVE-2020-36517](https://insights.sbomify.com/CVE-2020-36517/): Information disclosure in n/a (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-33045 and fix it if it is affected.

What it is: CVE-2026-33045 is a high-severity cross-site scripting vulnerability in home-assistant core, published on 27 Mar 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33045 exists.

Affected packages and fixed versions:
- homeassistant (PyPI): affected from 2025.02; fixed in 2026.01
- homeassistant (PyPI): affected from 2025.02; fixed in 2026.01
- homeassistant (PyPI): affected from 2025.02; fixed in 2026.01

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-33045/ (Markdown: https://insights.sbomify.com/CVE-2026-33045/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-33045
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-33045
- OSV: https://osv.dev/vulnerability/CVE-2026-33045

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-33045/
Summaries are generated and may contain mistakes; the official description above is the record.
