# CVE-2026-64823: Home Assistant Core XSS in Shelly integration async_get_media_image

Source: https://junglewise.ai/threats/cve-2026-64823-home-assistant-core-xss-in-shelly-integration-async-get-media  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-21. Updated: 2026-07-21  
License: CC BY 4.0 with a link back

CVE-2026-64823 · Severity: medium · CVSS 4.7 · Published 2026-07-21

Home Assistant Core, a popular open-source home automation platform, is vulnerable to a security flaw in its integration with Shelly smart devices. An attacker who controls a Shelly device on the network can inject malicious code into the Home Assistant interface. If a user views the affected device in their dashboard, the attacker could steal login session tokens or perform unauthorized actions like unlocking doors, disabling alarms, or opening garage covers.

Technologies: [Home Assistant Core](https://junglewise.ai/threats/technologies/home-assistant-core). Vendors: [Home Assistant](https://junglewise.ai/threats/vendors/home-assistant).

## Quick answers

**Is CVE-2026-64823 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-64823 being exploited in the wild.

**How severe is CVE-2026-64823?** Medium severity, with a CVSS score of 4.7, published 21 July 2026.

**Which products and versions are affected?** Home Assistant Core before 2026.5.4.

**Is there a fix for CVE-2026-64823?** A patch was published on 2026-05-20: Fix committed to core repository Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-64823 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-64823?** Check whether you run Home Assistant Core at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A stored Cross-Site Scripting (XSS) vulnerability exists in Home Assistant Core's Shelly integration within the `async_get_media_image()` method. The vulnerability arises because the media player proxy endpoint fails to validate the MIME type of data URIs provided in a device's 'thumb' field against an image-only allowlist. By supplying a data URI with a `text/html` content type, an attacker can cause the Home Assistant web origin to serve attacker-controlled HTML/JavaScript. This allows for the execution of malicious scripts in the context of an authenticated user's session, potentially leading to the theft of session tokens from local storage and the ability to make authenticated REST API calls to sensitive components like locks and alarms. The issue is fixed in version 2026.5.4 by implementing strict MIME type validation.

## Affected products

- Home Assistant Home Assistant Core before 2026.5.4

## Timeline

- 2026-05-20: patched: Fix committed to core repository
- 2026-05-22: advisory: Release 2026.5.4 published
- 2026-07-21: disclosed: CVE published to NVD

## References

- [https://github.com/home-assistant/core/commit/894a68acb678afc382fe5ea9002e61ab7f862011](https://github.com/home-assistant/core/commit/894a68acb678afc382fe5ea9002e61ab7f862011)
- [https://github.com/home-assistant/core/pull/171585](https://github.com/home-assistant/core/pull/171585)
- [https://github.com/home-assistant/core/releases/tag/2026.5.4](https://github.com/home-assistant/core/releases/tag/2026.5.4)
- [https://www.vulncheck.com/advisories/home-assistant-core-xss-via-shelly-media-player-py-thumb-uri](https://www.vulncheck.com/advisories/home-assistant-core-xss-via-shelly-media-player-py-thumb-uri)

## Related threats

- [Home Assistant Core path traversal in backup upload](https://junglewise.ai/threats/cve-2026-64825-home-assistant-core-path-traversal-in-backup-upload)
