Home AssistantApplication

CVE-2023-41896

CRITICAL · 9.0 CVSS v3.1 Published 2023-10-19
Fix available
A fix is available. Upgrade to 8.2.0 / 2023.8.0 or later.
See remediation →
94/100
Remediation priority · Urgent
Remotely reachable

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

This is a WebSocket authentication bypass vulnerability in Home Assistant where the `auth_callback=1` parameter combined with a manipulated `state` parameter (containing `hassUrl`) forces the frontend to connect to an attacker-controlled WebSocket backend instead of the legitimate one. The attacker can then spoof WebSocket responses to achieve XSS on the actual Home Assistant domain, enabling full account takeover since the malicious XSS can communicate with the real backend.

MitigationUpgrade to Home Assistant Core version 2023.8.0 or later, or update the npm package home-assistant-js-websocket to version 8.2.0 or later. There are no available workarounds.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Home AssistantApplication
Affected:< 2023.8.0
Home Assistant Js WebsocketApplication
Affected:< 8.2.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check Home Assistant Core version in the UI
    Navigate to Settings > System > About in the Home Assistant web interface and look for the Core version number displayed.
    Affected if The displayed Core version is less than 2023.8.0 (for example, 2023.7.x, 2023.6.x, etc.)
  2. Check Home Assistant Core version via command line
    Run the command `ha core info` if you have the Home Assistant CLI installed, or check the file `/config/.HA_VERSION` on your system.
    Affected if The reported version is below 2023.8.0
  3. Check frontend WebSocket library version (for developers)
    If you maintain a custom frontend integration or package, check your package.json or node_modules for the `home-assistant-js-websocket` package version.
    Affected if The installed version of home-assistant-js-websocket is below 8.2.0
  4. Identify if auth_callback parameter is being processed
    Review your Home Assistant logs and network traffic for any requests containing `auth_callback=1` combined with a `state` parameter, especially if the state contains an external or unexpected `hassUrl` value.
    Affected if Such requests are being processed by your instance (indicates potential exploitation attempt or vulnerable endpoint exposure)

You are affected if your Home Assistant Core version is below 2023.8.0 or your home-assistant-js-websocket library version is below 8.2.0, as either of these enables the authentication bypass vulnerability.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 8.2.0 / 2023.8.0 or later
Fixed in 8.2.02023.8.0
Interim mitigation

Upgrade to Home Assistant Core version 2023.8.0 or later, or update the npm package home-assistant-js-websocket to version 8.2.0 or later. There are no available workarounds.

Recommended fix High confidence

Home Assistant Core 2023.8.0 or higher; home-assistant-js-websocket version 8.2.0 or higher

  1. 1. Back up your Home Assistant configuration before upgrading
  2. 2. For Home Assistant Core installations: Upgrade to version 2023.8.0 or later using your installation method (pip, container, OS, etc.)
  3. 3. For npm-based projects using the WebSocket library: Update the home-assistant-js-websocket package to version 8.2.0 or later by running 'npm update home-assistant-js-websocket' or 'npm install home-assistant-js-websocket@latest'
  4. 4. After upgrading, verify the WebSocket connection is functioning correctly
  5. 5. Check Home Assistant logs to confirm no errors related to authentication or WebSocket connections

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Home Assistant Scoped from the published advisory
  • Consultation6.0 h
  • Implementation12.0 h
  • Testing6.0 h
  • Review / QA4.0 h
28.0 hours of engineering $4,980
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $7,968.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-41896 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2023-41896 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data