CVE-2023-41896
Fake websocket server installation permits full takeover in Home Assistant Core
Mitigation
- Upgrade core to 8.2.0 or later.
Who should check
- Anyone running home-assistant core Home Assistant Core : < 2023.8.0; home-assistant-js-websocket: < 8.2.0
Vulnerability facts
- Affected
- home-assistant core Home Assistant Core : < 2023.8.0; home-assistant-js-websocket: < 8.2.0
- Fixed in
- home-assistant core 2023.8.0, home-assistant core 8.2.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 7.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: Low
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.38% chance of exploitation in 30 days (percentile 24, 2026-11-26)
- CWE
- CWE-345
- Modified
Description
Home assistant is an open source home automation. Whilst auditing the frontend code to identify hidden parameters, Cure53 detected `auth_callback=1`, which is leveraged by the WebSocket authentication logic in tandem with the `state` parameter. The state parameter contains the `hassUrl`, which is subsequently utilized to establish a WebSocket connection. This behavior permits an attacker to create a malicious Home Assistant link with a modified state parameter that forces the frontend to connect to an alternative WebSocket backend. Henceforth, the attacker can spoof any WebSocket responses and trigger cross site scripting (XSS). Since the XSS is executed on the actual Home Assistant frontend domain, it can connect to the real Home Assistant backend, which essentially represents a comprehensive takeover scenario. Permitting the site to be iframed by other origins, as discussed in GHSA-935v-rmg9-44mw, renders this exploit substantially covert since a malicious website can obfuscate the compromise strategy in the background. However, even without this, the attacker can still send the `auth_callback` link directly to the victim user. To mitigate this issue, Cure53 advises modifying the WebSocket code’s authentication flow. An optimal implementation in this regard would not trust the `hassUrl` passed in by a GET parameter. Cure53 must stipulate the significant time required of the Cure53 consultants to identify an XSS vector, despite holding full control over the WebSocket responses. In many areas, data from the WebSocket was properly sanitized, which hinders post-exploitation. The audit team eventually detected the `js_url` for custom panels, though generally, the frontend exhibited reasonable security hardening. This issue has been addressed in Home Assistant Core version 2023.8.0 and in the npm package home-assistant-js-websocket in version 8.2.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| home-assistant core | Home Assistant Core : < 2023.8.0; home-assistant-js-websocket: < 8.2.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-41896. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-41896.md Affected: home-assistant core Home Assistant Core : < 2023.8.0; home-assistant-js-websocket: < 8.2.0 Fixed in: home-assistant core 2023.8.0, home-assistant core 8.2.0 Steps: 1. Search this machine and project for home-assistant core: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2023-41896 being exploited?
There is no confirmed exploitation: CVE-2023-41896 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.38% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-41896?
High: CVSS 7.1 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2023-41896?
home-assistant core Home Assistant Core : < 2023.8.0; home-assistant-js-websocket: < 8.2.0.
Is there a fix for CVE-2023-41896?
Yes. Fixed in home-assistant core 2023.8.0, home-assistant core 8.2.0. Upgrade core to 8.2.0 or later.
How do I check if I'm affected by CVE-2023-41896?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.