{"answers":{"affected":"It affects 2 products.","exploited":"There is no known exploitation of CVE-2023-41896 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2023-41896 yet. Limit exposure of the affected software until one is available.","what":"CVE-2023-41896 is a high-severity cross-site scripting vulnerability in home-assistant core, published on 19 Oct 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-41896 and fix it if it is affected.\n\nWhat it is: CVE-2023-41896 is a high-severity cross-site scripting vulnerability in home-assistant core, published on 19 Oct 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2023-41896 in the wild and no public exploit code.\n\nAffected product: home-assistant core. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-41896/ (Markdown: https://insights.sbomify.com/CVE-2023-41896/index.md)","id":"CVE-2023-41896","markdown":"https://insights.sbomify.com/CVE-2023-41896/index.md","name":"CVE-2023-41896","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Home Assistant Core","requires_auth":"low_privilege","summary":"Attackers can force WebSocket connections to malicious servers via crafted links, enabling XSS and full account takeover in Home Assistant.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"home-assistant","vendor":"home-assistant"},{"product":"home-assistant-js-websocket","vendor":"home-assistant"}],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-345","name":"Insufficient Verification of Data Authenticity"}],"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"Fake websocket server installation permits full takeover in Home Assistant Core","id":"CVE-2023-41896","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"xss","year":"2023"},"n_packages":0,"n_references":2,"next":{"headline":"Lack of XFO header allows clickjacking in Home Assistant Core","id":"CVE-2023-41897"},"packages":[],"prev":{"headline":"Cross-site Scripting via auth_callback login in Home Assistant Core","id":"CVE-2023-41895"},"products":["core"],"published":"2023-10-19","related":[{"cvss_score":10,"headline":"Auth bypass in core","id":"CVE-2023-27482","kev_date_added":null,"published":"2023-03-08"},{"cvss_score":8.8,"headline":"Cross-site Scripting via auth_callback login in Home Assistant Core","id":"CVE-2023-41895","kev_date_added":null,"published":"2023-10-19"},{"cvss_score":8.8,"headline":"Lack of XFO header allows clickjacking in Home Assistant Core","id":"CVE-2023-41897","kev_date_added":null,"published":"2023-10-19"},{"cvss_score":7.6,"headline":"Home Assistant: Konnected alarm-panel switch state and zone topology disclosed to unauthenticated actors on the LAN","id":"CVE-2026-54317","kev_date_added":null,"published":"2026-06-23"},{"cvss_score":7.5,"headline":"Information disclosure in n/a","id":"CVE-2020-36517","kev_date_added":null,"published":"2022-03-07"},{"cvss_score":7.5,"headline":"Home Assistant information disclosure vulnerability","id":"CVE-2018-21019","kev_date_added":null,"published":"2019-09-23"},{"cvss_score":7.3,"headline":"Home Assistant has stored XSS in Map-card through malicious device name","id":"CVE-2026-33044","kev_date_added":null,"published":"2026-03-27"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-09-12","vendors":["home-assistant"]},"summary":"Attackers can force WebSocket connections to malicious servers via crafted links, enabling XSS and full account takeover in Home Assistant.","url":"https://insights.sbomify.com/CVE-2023-41896/"}