CVE-2026-32111: ha-mcp OAuth 2.1 DCR mode enables network reconnaissance via an error oracle
The OAuth mode of ha-mcp, the Home Assistant MCP server, makes a server-side request to any ha_url a visitor submits, with no validation. An unauthenticated attacker can map hosts and open ports on the server's network from the error messages. Only the beta OAuth mode is affected. Upgrade ha-mcp to 7.0.0.
Published Mar 12, 2026 · Analysis Oct 31, 2026
What an attacker can do
When someone submits the OAuth consent form, _validate_ha_credentials() in provider.py sends a GET to the supplied ha_url plus /api/config. It checks no scheme, IP or domain. The error text differs by outcome: could not connect (host down or port closed), connection timed out (host up, port filtered), invalid access token for 401, access forbidden for 403, and failed to connect with the exact HTTP status otherwise. That is an error oracle.
An attacker can script the whole flow. Register a client through the open dynamic client registration endpoint (POST /register), start authorization, take the txn_id, and submit URLs one by one. No user interaction is needed.
Two more paths share the primitive. OAuth access tokens are unsigned base64 JSON holding ha_url and ha_token, so an attacker can forge one. REST tool calls then hit fixed Home Assistant API paths on that host and return JSON. WebSocket calls connect to the host's /api/websocket and fail on non-Home Assistant targets. The advisory rates both as limited in practice. Confirmed impact is internal network reconnaissance only.
Who is affected
ha-mcp (pip) versions below 7.0.0, only when the beta OAuth 2.1 mode is enabled (documented in docs/OAUTH.md). The standard deployment, with a private URL and a pre-configured HOMEASSISTANT_TOKEN, is not affected.
pip show ha-mcpCheck your launch configuration for OAuth settings. If you only set HOMEASSISTANT_URL and HOMEASSISTANT_TOKEN, you are on the standard path.
ha-mcp
- Ecosystem
- PyPI
- Affected
- < 7.0.0
- Fixed in
- 7.0.0
- Check
pip show ha-mcp
How to fix it
Upgrade to ha-mcp 7.0.0.
pip install --upgrade ha-mcpThe advisory states the fix in one line and gives no workaround. Until you upgrade, switch to the standard pre-configured URL and token deployment, or do not expose the OAuth endpoints (/register and the consent form) to untrusted networks.
How to tell if you were hit
Look in ha-mcp logs and reverse proxy logs for many POST requests to /register followed by repeated consent form submissions with different ha_url values, especially internal addresses such as private ranges, localhost and cloud metadata addresses. Outbound connection attempts from the ha-mcp host to unusual internal hosts and ports, in quick succession, show the oracle at work. Beam records MCP tool calls from agents, which would show REST and WebSocket tool calls made with a forged token.
Original advisory
From the GitHub Advisory Database (CC BY 4.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.
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.
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.
Fix
Upgrade to 7.0.0
Credited to yotampe-pluto, julienld.
Questions
- Is the default ha-mcp setup affected by CVE-2026-32111?
No. The advisory says the standard deployment with a private URL and pre-configured HOMEASSISTANT_TOKEN is not affected. Only the beta OAuth 2.1 mode is.
- Does the attacker need credentials?
No. Client registration is open, and the attacker can drive the consent flow without user interaction.
- Can the attacker read internal data?
Only limited information. The confirmed impact is reconnaissance through error messages. The forged-token paths return data only from hosts that answer like Home Assistant.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-129235
Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path
medium5.3Nov 16, 2026CVE-2026-129236
Kubeshark: MCP `start_kubeshark` argument injection via `pod_regex` → image redirect → cluster takeover
high7.2Nov 16, 2026CVE-2026-68934
code-review-mcp-server: Command injection via unsanitized folderPath/baseBranch parameters
high8.7Nov 16, 2026CVE-2026-102943
Dagu MCP DAG specification read bypasses path containment and workspace isolation
medium6.5Nov 10, 2026CVE-2026-102610
fast-agent: `fast-agent serve` binds HTTP to 0.0.0.0 with no authentication by default; with --shell this is unauthenticated remote command execution
medium6.4Nov 9, 2026CVE-2026-63655
tsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS
high7.5Nov 9, 2026
