CVE-2023-41893: Homeassistant Home Assistant Vulnerable To Account Vulnerability

MODERATE
Advisory Identifier: GHSA-qhhj-7hrc-gqj5
CVSS 4.3
CWE-200
Published
Advisory Summary

CVE-2023-41893 is a MODERATE (CVSS 4.3) home assistant vulnerable to account vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Homeassistant libraries in the PyPI ecosystem. The issue involves home assistant vulnerable to account takeover via auth_callback login. Remediation is available by upgrading affected packages to version 2023.9.0.

CVE-2023-41893 at a Glance

CVE Identifier CVE-2023-41893
GHSA Identifier GHSA-qhhj-7hrc-gqj5
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Homeassistant
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-41893

To remediate this vulnerability, upgrade all affected Homeassistant dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

homeassistant fixed: 2023.9.0
pip install homeassistant>=2023.9.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show homeassistant

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-41893, inspect your installed packages using pip:

pip show homeassistant

Analyze the terminal output to locate any version of Homeassistant in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2023.9.0), your application is affected.

Note: The pip show homeassistant command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Homeassistant, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

[_Part of the Cure53 security audit of Home Assistant._](https://www.home-assistant.io/blog/2023/10/19/security-audits-of-home-assistant/) The audit team’s analyses confirmed that the `redirect_uri` and `client_id` are alterable when logging in. Consequently, the code parameter utilized to fetch the `access_token` post-authentication will be sent to the URL specified in the aforementioned parameters. Since an arbitrary URL is permitted and `homeassistant.local` represents the preferred, default domain likely used and trusted by many users, an attacker could leverage this weakness to manipulate a user and retrieve account access. Notably, this attack strategy is plausible if the victim has exposed their Home Assistant to the Internet, since after acquiring the victim’s `access_token`, the adversary would need to utilize it directly towards the instance to achieve any pertinent malicious actions. To achieve this compromise attempt, the attacker must send a link with a `redirect_uri` that they control to the victim’s own Home Assistant instance. In the eventuality the victim authenticates via the said link, the attacker would obtain code sent to the specified URL in `redirect_uri`, which can then be leveraged to fetch an `access_token`. An attacker could increase the efficacy of this strategy by registering a nearly identical domain to `homeassistant.local`, which at first glance may appear legitimate and thereby obfuscate any malicious intentions. Nonetheless, owing to the requirements for victim interaction and Home Assistant instance exposure to the Internet, this severity rating was consequently downgraded to Low.

CVE-2023-41893 Affected Homeassistant Versions

1 component(s)
Fixed Versions:
2023.9.0
Product / Package Ecosystem Affected Versions Fixed Version
homeassistant
PyPI
< 2023.9.0
2023.9.0

References

Frequently Asked Questions

What is CVE-2023-41893?
CVE-2023-41893 is a security vulnerability in Homeassistant involving Home Assistant vulnerable to account takeover via auth_callback login under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Homeassistant versions are affected?
Affected versions include releases prior to 2023.9.0 across affected packages: homeassistant.
What version fixes CVE-2023-41893?
Upgrading to 2023.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is homeassistant affected?
Yes, homeassistant is affected in releases prior to 2023.9.0. Upgrade your dependency to 2023.9.0 or later.
What is the CVSS score of CVE-2023-41893?
CVE-2023-41893 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2023-41893?
CVE-2023-41893 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check PyPI dependencies for CVE-2023-41893?
Run the dependency tree command: 'pip show homeassistant'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qhhj-7hrc-gqj5",
  "modified" : "2024-09-20T21:11:07Z",
  "published" : "2023-10-26T21:46:22Z",
  "aliases" : [ "CVE-2023-41893" ],
  "summary" : "Home Assistant vulnerable to account takeover via auth_callback login",
  "details" : "[_Part of the Cure53 security audit of Home Assistant._](https://www.home-assistant.io/blog/2023/10/19/security-audits-of-home-assistant/)\n\nThe audit team’s analyses confirmed that the `redirect_uri` and `client_id` are alterable when logging in. Consequently, the code parameter utilized to fetch the `access_token` post-authentication will be sent to the URL specified in the aforementioned parameters.\n\nSince an arbitrary URL is permitted and `homeassistant.local` represents the preferred, default domain likely used and trusted by many users, an attacker could leverage this weakness to manipulate a user and retrieve account access. Notably, this attack strategy is plausible if the victim has exposed their Home Assistant to the Internet, since after acquiring the victim’s `access_token`, the adversary would need to utilize it directly towards the instance to achieve any pertinent malicious actions.\n\nTo achieve this compromise attempt, the attacker must send a link with a `redirect_uri` that they control to the victim’s own Home Assistant instance. In the eventuality the victim authenticates via the said link, the attacker would obtain code sent to the specified URL in `redirect_uri`, which can then be leveraged to fetch an `access_token`.\n\nAn attacker could increase the efficacy of this strategy by registering a nearly identical domain to `homeassistant.local`, which at first glance may appear legitimate and thereby obfuscate any malicious intentions.\n\nNonetheless, owing to the requirements for victim interaction and Home Assistant instance exposure to the Internet, this severity rating was consequently downgraded to Low.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "homeassistant"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2023.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/home-assistant/core/security/advisories/GHSA-qhhj-7hrc-gqj5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41893"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/home-assistant/core"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/homeassistant/PYSEC-2023-214.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.home-assistant.io/blog/2023/10/19/security-audits-of-home-assistant"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-26T21:46:22Z",
    "nvd_published_at" : "2023-10-20T00:15:16Z"
  }
}