CVE-2026-32112: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in homeassistant-ai ha-mcp
CVE-2026-32112 is a cross-site scripting (XSS) vulnerability in the ha-mcp OAuth consent form of the Home Assistant MCP Server prior to version 7. 0. 0. The issue arises because user-controlled parameters are rendered using Python f-strings without proper HTML escaping, allowing injection of malicious JavaScript. Exploitation requires an attacker to lure a server operator into visiting a crafted authorization URL while running the beta OAuth mode (ha-mcp-oauth), which is not enabled by default. This vulnerability impacts confidentiality and integrity by enabling script execution in the operator's browser but does not affect availability. The CVSS score is 6. 8 (medium severity), reflecting the need for user interaction and high attack complexity. The vulnerability is fixed in version 7. 0.
AI Analysis
Technical Summary
CVE-2026-32112 is a medium-severity cross-site scripting (XSS) vulnerability affecting the ha-mcp component of the Home Assistant MCP Server before version 7.0.0. The vulnerability stems from improper neutralization of user input during web page generation, specifically in the OAuth consent form. The ha-mcp OAuth consent form uses Python f-strings to render user-controlled parameters without applying HTML escaping or sanitization, violating CWE-79. This allows an attacker who can reach the OAuth endpoint to craft a malicious authorization URL that, when visited by a server operator, executes arbitrary JavaScript in their browser context. The attack vector requires the server to be running the beta OAuth mode (ha-mcp-oauth), which is not part of the standard Home Assistant setup and requires explicit configuration, limiting the attack surface. The vulnerability impacts confidentiality and integrity by enabling theft of sensitive information or manipulation of the operator’s session. The CVSS 3.1 base score is 6.8, reflecting network attack vector, high attack complexity, no privileges required, user interaction required, unchanged scope, and high impact on confidentiality and integrity but no impact on availability. No known exploits are reported in the wild. The issue is resolved in ha-mcp version 7.0.0 by implementing proper HTML escaping or sanitization of user input in the OAuth consent form. This vulnerability highlights the risks of rendering user input directly in web pages without proper encoding, especially in security-sensitive OAuth flows.
Potential Impact
The primary impact of CVE-2026-32112 is the potential compromise of confidentiality and integrity for organizations running the ha-mcp component with beta OAuth mode enabled. Successful exploitation allows an attacker to execute arbitrary JavaScript in the browser of the server operator, potentially leading to theft of authentication tokens, session hijacking, or unauthorized actions performed with the operator’s privileges. While availability is not affected, the breach of operator credentials or session data can lead to further compromise of the Home Assistant environment or connected systems. Since the vulnerability requires user interaction and access to the OAuth endpoint, the attack surface is limited but still significant for organizations using this beta feature. The impact is particularly critical in environments where Home Assistant controls sensitive IoT devices or automation workflows, as attackers could leverage stolen credentials or session data to manipulate device behavior or exfiltrate data. The absence of known exploits in the wild reduces immediate risk but does not eliminate the threat, especially as the vulnerability is publicly disclosed. Organizations ignoring this vulnerability risk targeted phishing or social engineering attacks against operators to trigger the exploit.
Mitigation Recommendations
To mitigate CVE-2026-32112, organizations should upgrade ha-mcp to version 7.0.0 or later, where the vulnerability is fixed by proper HTML escaping of user input in the OAuth consent form. Until upgrading is possible, organizations should disable the beta OAuth mode (ha-mcp-oauth) if it is not strictly required, as this mode is the only affected configuration. Restrict network access to the OAuth endpoint to trusted internal users only, minimizing exposure to external attackers. Implement strict URL filtering and monitoring to detect and block suspicious authorization URLs that could be used in phishing attempts. Educate server operators about the risks of clicking on unsolicited or suspicious authorization links, emphasizing the need for caution with URLs received via email or messaging. Review and harden the Home Assistant environment’s overall security posture, including multi-factor authentication for operator accounts and regular auditing of OAuth configurations. Employ Content Security Policy (CSP) headers where possible to reduce the impact of XSS attacks by restricting script execution sources. Finally, monitor security advisories from Home Assistant and related projects for updates or additional patches.
Affected Countries
United States, Germany, United Kingdom, Netherlands, Canada, Australia, France, Japan, South Korea, Sweden
CVE-2026-32112: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in homeassistant-ai ha-mcp
Description
CVE-2026-32112 is a cross-site scripting (XSS) vulnerability in the ha-mcp OAuth consent form of the Home Assistant MCP Server prior to version 7. 0. 0. The issue arises because user-controlled parameters are rendered using Python f-strings without proper HTML escaping, allowing injection of malicious JavaScript. Exploitation requires an attacker to lure a server operator into visiting a crafted authorization URL while running the beta OAuth mode (ha-mcp-oauth), which is not enabled by default. This vulnerability impacts confidentiality and integrity by enabling script execution in the operator's browser but does not affect availability. The CVSS score is 6. 8 (medium severity), reflecting the need for user interaction and high attack complexity. The vulnerability is fixed in version 7. 0.
AI-Powered Analysis
Technical Analysis
CVE-2026-32112 is a medium-severity cross-site scripting (XSS) vulnerability affecting the ha-mcp component of the Home Assistant MCP Server before version 7.0.0. The vulnerability stems from improper neutralization of user input during web page generation, specifically in the OAuth consent form. The ha-mcp OAuth consent form uses Python f-strings to render user-controlled parameters without applying HTML escaping or sanitization, violating CWE-79. This allows an attacker who can reach the OAuth endpoint to craft a malicious authorization URL that, when visited by a server operator, executes arbitrary JavaScript in their browser context. The attack vector requires the server to be running the beta OAuth mode (ha-mcp-oauth), which is not part of the standard Home Assistant setup and requires explicit configuration, limiting the attack surface. The vulnerability impacts confidentiality and integrity by enabling theft of sensitive information or manipulation of the operator’s session. The CVSS 3.1 base score is 6.8, reflecting network attack vector, high attack complexity, no privileges required, user interaction required, unchanged scope, and high impact on confidentiality and integrity but no impact on availability. No known exploits are reported in the wild. The issue is resolved in ha-mcp version 7.0.0 by implementing proper HTML escaping or sanitization of user input in the OAuth consent form. This vulnerability highlights the risks of rendering user input directly in web pages without proper encoding, especially in security-sensitive OAuth flows.
Potential Impact
The primary impact of CVE-2026-32112 is the potential compromise of confidentiality and integrity for organizations running the ha-mcp component with beta OAuth mode enabled. Successful exploitation allows an attacker to execute arbitrary JavaScript in the browser of the server operator, potentially leading to theft of authentication tokens, session hijacking, or unauthorized actions performed with the operator’s privileges. While availability is not affected, the breach of operator credentials or session data can lead to further compromise of the Home Assistant environment or connected systems. Since the vulnerability requires user interaction and access to the OAuth endpoint, the attack surface is limited but still significant for organizations using this beta feature. The impact is particularly critical in environments where Home Assistant controls sensitive IoT devices or automation workflows, as attackers could leverage stolen credentials or session data to manipulate device behavior or exfiltrate data. The absence of known exploits in the wild reduces immediate risk but does not eliminate the threat, especially as the vulnerability is publicly disclosed. Organizations ignoring this vulnerability risk targeted phishing or social engineering attacks against operators to trigger the exploit.
Mitigation Recommendations
To mitigate CVE-2026-32112, organizations should upgrade ha-mcp to version 7.0.0 or later, where the vulnerability is fixed by proper HTML escaping of user input in the OAuth consent form. Until upgrading is possible, organizations should disable the beta OAuth mode (ha-mcp-oauth) if it is not strictly required, as this mode is the only affected configuration. Restrict network access to the OAuth endpoint to trusted internal users only, minimizing exposure to external attackers. Implement strict URL filtering and monitoring to detect and block suspicious authorization URLs that could be used in phishing attempts. Educate server operators about the risks of clicking on unsolicited or suspicious authorization links, emphasizing the need for caution with URLs received via email or messaging. Review and harden the Home Assistant environment’s overall security posture, including multi-factor authentication for operator accounts and regular auditing of OAuth configurations. Employ Content Security Policy (CSP) headers where possible to reduce the impact of XSS attacks by restricting script execution sources. Finally, monitor security advisories from Home Assistant and related projects for updates or additional patches.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-10T22:02:38.855Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69b1d7c72f860ef94378fdd2
Added to database: 3/11/2026, 8:59:51 PM
Last enriched: 3/11/2026, 9:14:25 PM
Last updated: 3/11/2026, 11:06:09 PM
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.