9.0
CRITICAL
CVE-2023-41896
"Home Assistant WebSocket Authentication Bypass XSS"
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.

INFO

Published Date :

Oct. 19, 2023, 11:15 p.m.

Last Modified :

Oct. 26, 2023, 4:18 p.m.

Remotely Exploitable :

Yes !

Impact Score :

6.0

Exploitability Score :

2.3
Affected Products

The following products are affected by CVE-2023-41896 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Home-assistant home-assistant
2 Home-assistant home-assistant-js-websocket
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2023-41896.

URL Resource
https://github.com/home-assistant/core/security/advisories/GHSA-935v-rmg9-44mw Not Applicable
https://github.com/home-assistant/core/security/advisories/GHSA-cr83-q7r2-7f5q Vendor Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-41896 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-41896 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Oct. 26, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
    Changed Reference Type https://github.com/home-assistant/core/security/advisories/GHSA-935v-rmg9-44mw No Types Assigned https://github.com/home-assistant/core/security/advisories/GHSA-935v-rmg9-44mw Not Applicable
    Changed Reference Type https://github.com/home-assistant/core/security/advisories/GHSA-cr83-q7r2-7f5q No Types Assigned https://github.com/home-assistant/core/security/advisories/GHSA-cr83-q7r2-7f5q Vendor Advisory
    Added CWE NIST CWE-345
    Added CPE Configuration OR *cpe:2.3:a:home-assistant:home-assistant:*:*:*:*:*:*:*:* versions up to (excluding) 2023.8.0 *cpe:2.3:a:home-assistant:home-assistant-js-websocket:*:*:*:*:*:node.js:*:* versions up to (excluding) 8.2.0
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-41896 is associated with the following CWEs:

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.09 }} 0.03%

score

0.37383

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability