CVE-2026-32111: ha-mcp OAuth 2.1 DCR mode enables network reconnaissance via an error oracle

Published Mar 11, 2026
·
Updated

Summary

The ha-mcp OAuth consent form (beta feature) accepts a user-supplied haurl and makes a server-side HTTP request to {haurl}/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 HOMEASSISTANTTOKEN) is not affected.

Details

Code path 1 — Consent form validation (reported)

When a user submits the OAuth consent form, validatehacredentials() (provider.py) makes a server-side GET request to {haurl}/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 txnid, and submit arbitrary haurl values. No user interaction required.

Code path 2 — REST tool calls with forged token

OAuth access tokens are stateless base64-encoded JSON payloads ({"haurl": "...", "hatoken": "..."}). Since tokens are not signed, an attacker can forge a token with an arbitrary haurl. 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 haurl 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://{haurl}/api/websocket. The client follows the HA WebSocket handshake protocol (waits for authrequired, sends auth, expects authok). 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 HOMEASSISTANTURL and HOMEASSISTANTTOKEN) is not affected.

Fix

Upgrade to 7.0.0

Other sources

ha-mcp is a Home Assistant MCP Server. Prior to 7.0.0, the ha-mcp OAuth consent form (beta feature) accepts a user-supplied haurl and makes a server-side HTTP request to {haurl}/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 HOMEASSISTANTTOKEN) is not affected. This vulnerability is fixed in 7.0.0.

MITRE

Affected Software

3 affected componentsFixes available
Home Assistant MCP Server<7.0.0
pip/ha-mcp<7.0.0
7.0.0
Homeassistant-ai Home Assistant Mcp Server<7.0.0

Event History

Mar 11, 2026
CVE Published
via MITRE·08:41 PM
Data Sourced
via MITRE·08:41 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 PM
Affected Software
Mar 12, 2026
Advisory Published
via GitHub·02:23 PM
Data Sourced
via GitHub·02:23 PM
DescriptionSeverityWeaknessAffected Software
Nov 20, 58180
Event
via FIRST·04:59 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-32111?

CVE-2026-32111 is classified as a medium-severity vulnerability due to its potential for enabling network reconnaissance.

2

How do I fix CVE-2026-32111?

To fix CVE-2026-32111, you should upgrade the ha-mcp package to version 7.0.0 or later.

3

What software is affected by CVE-2026-32111?

CVE-2026-32111 affects the Home Assistant MCP Server and the ha-mcp package up to version 7.0.0.

4

What is the exploitability of CVE-2026-32111?

CVE-2026-32111 can be exploited by unauthenticated attackers due to the lack of URL validation in the consent form.

5

What kind of attack does CVE-2026-32111 facilitate?

CVE-2026-32111 facilitates network reconnaissance through an error oracle due to improper handling of user-supplied hai_url.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203