CVE-2026-32111

CVE-2026-32111 is a medium-severity server-side request forgery (SSRF) vulnerability in ha-mcp (pip), affecting versions < 7.0.0. It is fixed in 7.0.0.

Summary

The ha-mcp OAuth consent form (beta feature) accepts a user-supplied ha_url and makes a server-side HTTP request to {ha_url}/api/config with no URL validation. An unauthenticated attacker can submit arbitrary URLs to perform internal network reconnaissance via an error oracle. Two additional code paths in OAuth tool calls (REST and WebSocket) are affected by the same primitive.

The primary deployment method (private URL with pre-configured HOMEASSISTANT_TOKEN) is not affected.

Details

Code path 1, Consent form validation (reported)

When a user submits the OAuth consent form, _validate_ha_credentials() (provider.py) makes a server-side GET request to {ha_url}/api/config with no scheme, IP, or domain validation. Different exception types produce distinct error messages, creating an error oracle:

Outcome Message returned Information leaked
ConnectError "Could not connect..." Host down or port closed
TimeoutException "Connection timed out..." Host up, port filtered
HTTP 401 "Invalid access token..." Service alive, requires auth
HTTP 403 "Access forbidden..." Service alive, forbidden
HTTP ≥ 400 "Failed to connect: HTTP {N}" Service alive, exact status

An attacker can drive the flow programmatically: register a client via open DCR (POST /register), initiate authorization, extract a txn_id, and submit arbitrary ha_url values. No user interaction required.

Code path 2, REST tool calls with forged token

OAuth access tokens are stateless base64-encoded JSON payloads ({"ha_url": "...", "ha_token": "..."}). Since tokens are not signed, an attacker can forge a token with an arbitrary ha_url. REST tool calls then make HTTP requests to hardcoded HA API paths on that host (/config, /states, /services, etc.). JSON responses are returned to the caller.

In practice, path control is limited, most endpoints use absolute paths that ignore the ha_url path component. Useful exfiltration requires the target to return JSON at HA API paths, which is unlikely for non-HA services.

Code path 3, WebSocket tool calls with forged token

The same forged token triggers WebSocket connections to ws://{ha_url}/api/websocket. The client follows the HA WebSocket handshake protocol (waits for auth_required, sends auth, expects auth_ok). Non-HA targets fail at the protocol level and return nothing useful. Realistic exploitation is limited to pivoting to another HA instance on the internal network.

Scope

OAuth mode is a beta feature, documented separately in docs/OAUTH.md and not part of the main setup instructions. The standard deployment method (pre-configured HOMEASSISTANT_URL and HOMEASSISTANT_TOKEN) is not affected.

Upgrade to 7.0.0

Impact

Confirmed: Internal network reconnaissance via error oracle (all 3 code paths). An attacker can map reachable hosts and open ports from the server's network position.

Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.

CVE-2026-32111 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (7.0.0); upgrading removes the vulnerable code path.

Affected versions

ha-mcp (< 7.0.0)

Security releases

ha-mcp → 7.0.0 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade ha-mcp to 7.0.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-32111? CVE-2026-32111 is a medium-severity server-side request forgery (SSRF) vulnerability in ha-mcp (pip), affecting versions < 7.0.0. It is fixed in 7.0.0. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.
  2. How severe is CVE-2026-32111? CVE-2026-32111 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of ha-mcp are affected by CVE-2026-32111? ha-mcp (pip) versions < 7.0.0 is affected.
  4. Is there a fix for CVE-2026-32111? Yes. CVE-2026-32111 is fixed in 7.0.0. Upgrade to this version or later.
  5. Is CVE-2026-32111 exploitable, and should I be worried? Whether CVE-2026-32111 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-32111 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-32111? Upgrade ha-mcp to 7.0.0 or later.

Other vulnerabilities in ha-mcp

CVE-2026-32111

Stop the waste.
Protect your environment with Kodem.