CVE-2023-41896: Fake websocket server installation permits full takeover in Home Assistant Core

Published Oct 19, 2023
·
Updated

Home assistant is an open source home automation. Whilst auditing the frontend code to identify hidden parameters, Cure53 detected authcallback=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 authcallback 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 jsurl 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 Software

2 affected components
home-assistant home-assistant<2023.8.0
home-assistant Home-assistant-js-websocket Node.js<8.2.0

Event History

Oct 19, 2023
CVE Published
via MITRE·10:30 PM
Data Sourced
via MITRE·10:30 PM
DescriptionSeverityWeakness
Data Sourced
11:15 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2023-41896?

CVE-2023-41896 is a vulnerability in Home Assistant that allows an attacker to leverage the `auth_callback=1` parameter and `state` parameter to access sensitive information.

2

What is the severity of CVE-2023-41896?

The severity of CVE-2023-41896 is critical, with a severity value of 9.

3

How does CVE-2023-41896 affect Home Assistant?

CVE-2023-41896 affects Home Assistant versions up to 2023.8.0 and Home Assistant JS Websocket versions up to 8.2.0.

4

How can I fix CVE-2023-41896?

To fix CVE-2023-41896, it is recommended to update your Home Assistant and Home Assistant JS Websocket to the latest versions.

5

What is CWE-79 and CWE-345?

CWE-79 is a vulnerability related to Improper Neutralization of Input During Web Page Generation and CWE-345 is a vulnerability related to Insufficient Verification of Data Authenticity.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203