CVE-2023-41895 Cross-site Scripting via auth_callback login in Home Assistant Core

High 8.8 Published Updated

Attackers can execute arbitrary JavaScript on the Home Assistant login page via crafted redirect URIs, potentially leading to full account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2023-41895?

CVE-2023-41895 is a high-severity cross-site scripting vulnerability in home-assistant core, published on 19 Oct 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Home assistant is an open source home automation. The Home Assistant login page allows users to use their local Home Assistant credentials and log in to another website that specifies the `redirect_uri` and `client_id` parameters. Although the `redirect_uri` validation typically ensures that it matches the `client_id` and the scheme represents either `http` or `https`, Home Assistant will fetch the `client_id` and check for `<link rel="redirect_uri" href="...">` HTML tags on the page. These URLs are not subjected to the same scheme validation and thus allow for arbitrary JavaScript execution on the Home Assistant administration page via usage of `javascript:` scheme URIs. This Cross-site Scripting (XSS) vulnerability can be executed on the Home Assistant frontend domain, which may be used for a full takeover of the Home Assistant account and installation. This issue has been addressed in version 2023.9.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-79

Which versions are affected by CVE-2023-41895?

It affects 1 product.

Products include Home-Assistant Home-Assistant.

How do I fix CVE-2023-41895?

No fix has been published for CVE-2023-41895 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2023-41895 being exploited?

There is no known exploitation of CVE-2023-41895 in the wild and no public exploit code.

Sources

Also known as GHSA-jvxq-x42r-f7mv.

Is CVE-2023-41895 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free