Severity by source
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network vector via Shelly device thumb field; high complexity due to required device control and user interaction; scope changes as HA web origin is impacted beyond the vulnerable Shelly component; no direct impact on the vulnerable system.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
Home Assistant Core before 2026.5.4 contains a cross-site scripting vulnerability in the Shelly integration's async_get_media_image() method that allows attackers controlling a Shelly device's thumb field to serve arbitrary HTML content by supplying a data URI with a text/html content type without validation against an image-only allowlist. Attackers can cause the media player proxy endpoint to serve attacker-controlled bytes with Content-Type text/html in the Home Assistant web origin, enabling theft of session tokens from local storage and authenticated calls to sensitive service endpoints including lock, alarm, and cover controls.
AnalysisAI
Cross-site scripting in Home Assistant Core's Shelly integration allows an attacker who controls a Shelly device to execute arbitrary JavaScript in the Home Assistant web origin. The async_get_media_image() method fetches the device's thumb field without validating that the returned content is an image MIME type, permitting a malicious data:text/html URI to be proxied and re-served by the HA backend with Content-Type: text/html to the victim's browser. Exploitation is conditional on attacker control of an integrated Shelly device and requires active user interaction; no CISA KEV listing or public proof-of-concept exists at time of analysis, but successful exploitation grants access to session tokens and authenticated control of locks, alarms, and covers.
Technical ContextAI
Home Assistant Core (CPE: cpe:2.3:a:home-assistant:home_assistant_core:*:*:*:*:*:*:*:*) is a Python-based home automation platform. Its Shelly integration exposes a media player component whose async_get_media_image() method retrieves thumbnail artwork from Shelly devices via a server-side proxy endpoint. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation): the method accepted the Shelly device's thumb field value without enforcing an image-only MIME type allowlist. An attacker-supplied data:text/html,... URI is fetched server-side and the raw bytes are proxied to the browser under the HA web origin with the attacker-controlled Content-Type: text/html, causing the browser to render it as an HTML document and execute embedded scripts. The fix in PR #171585 (commit 894a68acb678afc382fe5ea9002e61ab7f862011, released in 2026.5.4) adds MIME type validation to restrict responses to image content types.
RemediationAI
Upgrade to Home Assistant Core 2026.5.4 or later; this release includes the fix from PR #171585 (commit 894a68acb678afc382fe5ea9002e61ab7f862011) which adds MIME type validation to async_get_media_image() enforcing an image-only allowlist. The release is available at https://github.com/home-assistant/core/releases/tag/2026.5.4. If immediate upgrade is not feasible, a targeted compensating control is to remove the Shelly integration from the HA instance (Settings → Devices & Services → Shelly → Delete), which eliminates the vulnerable proxy endpoint entirely at the cost of losing all Shelly device functionality. A narrower workaround is to ensure that Shelly devices on the network cannot receive external configuration changes - placing them on an isolated VLAN with no inbound internet access prevents an external attacker from setting the thumb field, though this does not protect against an attacker already on the local network.
More in Home Assistant
View allhomeassistant is an open source home automation tool. Rated critical severity (CVSS 10.0), this vulnerability is remotel
Home Assistant Community Store (HACS) 1.10.0 contains a path traversal vulnerability that allows unauthenticated attacke
Home assistant is an open source home automation. Rated critical severity (CVSS 9.6), this vulnerability is remotely exp
Home assistant is an open source home automation. Rated critical severity (CVSS 9.6), this vulnerability is remotely exp
Path-traversal to remote code execution in Home Assistant Core before 2026.6.0 lets an authenticated user who can supply
Home Assistant before 2021.1.3 does not have a protection layer that can help to prevent directory-traversal attacks aga
Arbitrary file write in Home Assistant Core before 2026.6.0 lets unauthenticated attackers plant attacker-controlled fil
Home assistant is an open source home automation. Rated critical severity (CVSS 9.0), this vulnerability is remotely exp
The Home Assistant Companion for iOS and macOS app up to version 2023.4 are vulnerable to Client-Side Request Forgery. R
Cross-origin JavaScript injection in Home Assistant Companion apps for Android (before 2026.4.4) and iOS (before 2026.4.
Home Assistant is open source home automation software. Rated medium severity (CVSS 4.3), this vulnerability is no authe
Home assistant is an open source home automation. Rated high severity (CVSS 7.8), this vulnerability is no authenticatio
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-46280
GHSA-r3v5-j696-5grq